Revision: 4578 http://sourceforge.net/p/vexi/code/4578 Author: clrg Date: 2013-11-17 02:18:09 +0000 (Sun, 17 Nov 2013) Log Message: ----------- Fix image fill sizing behaviour - tiled=false or minwidth/minheight changes were not affecting box size - now an image put invokes setMinWidth/setMinHeight - fixed some spelling and removed some debug exceptions
Modified Paths: -------------- branches/vexi3/org.vexi-core.main/src/main/jpp/org/vexi/core/Box.jpp Modified: branches/vexi3/org.vexi-core.main/src/main/jpp/org/vexi/core/Box.jpp =================================================================== --- branches/vexi3/org.vexi-core.main/src/main/jpp/org/vexi/core/Box.jpp 2013-11-15 18:31:05 UTC (rev 4577) +++ branches/vexi3/org.vexi-core.main/src/main/jpp/org/vexi/core/Box.jpp 2013-11-17 02:18:09 UTC (rev 4578) @@ -419,6 +419,8 @@ dirty(); // Tiled images affect contentsize if (test(TILE_IMAGE)) { + setMinWidth(renderprops.texture.width, true); + setMinHeight(renderprops.texture.height, true); setConstrain(); } } else if (renderprops.texture.loadFailed!=null) { @@ -578,7 +580,7 @@ constrain(); if (fromSurface.renderAborted()) { // if the current reflow/render has been aborted then - // defer place() until contraining has been completed + // defer place() until constraining has been completed return false; } tryResize(w, h, true); @@ -661,10 +663,6 @@ } else { clear(HAS_WIDTH_SLACK); } - // constrain contentwidth - if (renderprops.texture != null) { - new_contentwidth = max(new_contentwidth, renderprops.texture.width); - } new_contentwidth = max(new_contentwidth, renderprops.textwidth); } @@ -1204,7 +1202,7 @@ } // initiate reflow setConstrain(); - // contrain not guarranteed to invoke place + // constrain not guarranteed to invoke place setPlace(); // in box tree if (parent != null) { @@ -1213,10 +1211,6 @@ } if (firetraps && test(MINWIDTH_TRAP)) { Trap t = wtrap(SC_minwidth); - // FIXME: verify / investigate this or delete it if not reported - if (t==null && test(MINWIDTH_TRAP)) { - Log.warn(this, "Should not happen, MINWIDTH_TRAP set and t==null"); - } if (t!=null) { this.minwidth = JSU.toInt(Main.SCHEDULER.runBeforePut(t, JSU.N(minwidth))); Main.SCHEDULER.runAfterPut(null); @@ -1240,7 +1234,7 @@ } // initiate reflow setConstrain(); - // contrain not guarranteed to invoke place + // constrain not guarranteed to invoke place setPlace(); // in box tree if (parent != null) { @@ -1249,10 +1243,6 @@ } if (firetraps && test(MAXWIDTH_TRAP)) { Trap t = wtrap(SC_maxwidth); - // FIXME: verify / investigate this or delete it if not reported - if (t==null && test(MAXWIDTH_TRAP)) { - Log.warn(this, "Should not happen, MAXWIDTH_TRAP set and t==null"); - } if (t!=null) { this.maxwidth = JSU.toInt(Main.SCHEDULER.runBeforePut(t, JSU.N(maxwidth))); Main.SCHEDULER.runAfterPut(null); @@ -2615,10 +2605,9 @@ dirty(); if (renderprops.texture != null && renderprops.texture.isLoaded) { if (test(TILE_IMAGE)) { + // this will cause the Box's minimum dimensions + // to be set to the image dimensions when tiled run(null); - } else { - setMinMaxWidth(0, maxwidth); - setMinMaxHeight(0, maxheight); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn