[Checkins] SVN: z3c.reference/trunk/ fixed initial selected crop area when no ratio is given

Gerold Böhler gerold at reloc.org
Sun Dec 16 16:56:49 EST 2007


Log message for revision 82302:
  fixed initial selected crop area when no ratio is given

Changed:
  U   z3c.reference/trunk/flash/fla/imagetool.as
  U   z3c.reference/trunk/flash/src/z3c/reference/imagetool/baseskin/FlashvarSetup.as
  U   z3c.reference/trunk/src/z3c/reference/browser/resources/imagetool.swf

-=-
Modified: z3c.reference/trunk/flash/fla/imagetool.as
===================================================================
--- z3c.reference/trunk/flash/fla/imagetool.as	2007-12-16 14:46:24 UTC (rev 82301)
+++ z3c.reference/trunk/flash/fla/imagetool.as	2007-12-16 21:56:49 UTC (rev 82302)
@@ -29,12 +29,12 @@
     if (!_level0.url) _level0.url="toothbrush.jpg";
     
     //default values
-    if (_level0.crop_x == undefined) _level0.crop_x = -1;
-    if (_level0.crop_y == undefined) _level0.crop_y = -1;
-    if (_level0.crop_w == undefined) _level0.crop_w = 0;
-    if (_level0.crop_h == undefined) _level0.crop_h = 0;
+    if (_level0.crop_x == undefined) _level0.crop_x = 1240;
+    if (_level0.crop_y == undefined) _level0.crop_y = 880;
+    if (_level0.crop_w == undefined) _level0.crop_w = 400;
+    if (_level0.crop_h == undefined) _level0.crop_h = 300;
     if (_level0.rotation == undefined) _level0.rotation = 0;
-    if (_level0.presets == undefined) _level0.presets = "[{'ratio': '4:2', 'name': 'default'}]";//, {"name": "Output", "output_w": 123, "output_h": 321}, {"name": "Min", "min_w": 222, "min_h": 111}, {"name": "Max", "max_w": 555, "max_h": 444}, {"name": "MinMax", "output_w": 987, "output_h": 654, "max_w": 543, "max_h": 432, "min_w": 432, "min_h": 321}]';
+    if (_level0.presets == undefined) _level0.presets = "[{'ratio': '4:3', 'name': 'default'}]";//, {"name": "Output", "output_w": 123, "output_h": 321}, {"name": "Min", "min_w": 222, "min_h": 111}, {"name": "Max", "max_w": 555, "max_h": 444}, {"name": "MinMax", "output_w": 987, "output_h": 654, "max_w": 543, "max_h": 432, "min_w": 432, "min_h": 321}]';
 //crop_x=0&crop_y=0&crop_w=-1&crop_h=-1&rotation=0&presets=[{'ratio': '3:2', 'name': 'default', 'size': '450x300'}]
 }
 // Debug Block End

Modified: z3c.reference/trunk/flash/src/z3c/reference/imagetool/baseskin/FlashvarSetup.as
===================================================================
--- z3c.reference/trunk/flash/src/z3c/reference/imagetool/baseskin/FlashvarSetup.as	2007-12-16 14:46:24 UTC (rev 82301)
+++ z3c.reference/trunk/flash/src/z3c/reference/imagetool/baseskin/FlashvarSetup.as	2007-12-16 21:56:49 UTC (rev 82302)
@@ -163,8 +163,8 @@
     
         if (!preset.ratio)
         {
-            FlashvarManager.set("crop_w", imageAttitude.minOriginalSide * VIEWPORT_INITIAL_PERCENT);
-            FlashvarManager.set("crop_h", imageAttitude.minOriginalSide * VIEWPORT_INITIAL_PERCENT);
+            FlashvarManager.set("crop_w", imageAttitude.originalWidth * VIEWPORT_INITIAL_PERCENT);
+            FlashvarManager.set("crop_h", imageAttitude.originalHeight * VIEWPORT_INITIAL_PERCENT);
         }
         else
         {

Modified: z3c.reference/trunk/src/z3c/reference/browser/resources/imagetool.swf
===================================================================
(Binary files differ)



More information about the Checkins mailing list