#2152 closed defect (fixed)
dojo.lfx.wipeIn jumps at end of animation if specific contents inside
Reported by: | Owned by: | bill | |
---|---|---|---|
Priority: | high | Milestone: | 0.9 |
Component: | lfx | Version: | 0.4.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
dojo.lfx has some stange malfunctions, doesnt exist in 4.0
attaching test file
doesn't wipe in or out correctly if specific contents inside
Attachments (2)
Change History (15)
Changed 14 years ago by
Attachment: | test_case.html added |
---|
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
The main problem is that your testcase is missing a dojo.require call.
<script> dojo.require("dojo.lfx.html"); </script>
After that it should work. Reopen the bug if it doesn't, with more specific description about what the problem is.
comment:3 Changed 14 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
it not the case it doesnt work, it works.
the problem is that wiping isnt correct, just check the example, with that require its not better.
it worked ok in 4.0 and 4.1rc1 too ( but im not 100% sure )
comment:4 Changed 14 years ago by
the div that is wiping "skips" every time at some point and rendering getys broken, as other widgets like titlepane use wiping they have problems too. just run that in FF for example ;-)
comment:5 Changed 14 years ago by
Milestone: | → 0.5 |
---|
Ah OK, that's a better description. I suspect the height that it wipes to is probably miscalculated as though the first really long sentence appears on a single line. (Try making the browser window narrower and the skip effect is magnified.)
comment:6 Changed 14 years ago by
Owner: | changed from Bryan Forbes to bill |
---|---|
Status: | reopened → new |
comment:7 Changed 14 years ago by
Description: | modified (diff) |
---|---|
Summary: | dojo.lfx has some stange malfunctions, doesnt exist in 4.0 → dojo.lfx.wipeIn jumps at end of animation if specific contents inside |
comment:8 Changed 14 years ago by
FIX:
in wipeIn function change:
dojo.lang.forEach(nodes, function(node){ var oprop = { }; // old properties of node (before we mucked w/them) // get node height, either it's natural height or it's height specified via style or class attributes // (for FF, the node has to be (temporarily) rendered to measure height) // TODO: should this offscreen code be part of dojo.html, so that getBorderBox() works on hidden nodes? var origTop, origLeft, origPosition; with(node.style){ origTop=top; origLeft=left; origPosition=position; top="-9999px"; left="-9999px"; position="absolute"; display=""; } var height = dojo.html.getBorderBox(node).height;
TO :
dojo.lang.forEach(nodes, function(node){ var height = dojo.html.getBorderBox(node).height; var oprop = { }; // old properties of node (before we mucked w/them) // get node height, either it's natural height or it's height specified via style or class attributes // (for FF, the node has to be (temporarily) rendered to measure height) // TODO: should this offscreen code be part of dojo.html, so that getBorderBox() works on hidden nodes? var origTop, origLeft, origPosition; with(node.style){ origTop=top; origLeft=left; origPosition=position; top="-9999px"; left="-9999px"; position="absolute"; display=""; }
here is how my compressed function (and working) looks like:
dojo.lfx.html.wipeIn=function(_584,_585,_586,_587){ _584=dojo.lfx.html._byId(_584); var _588=[]; dojo.lang.forEach(_584,function(node){ move this part here from lower parts of the code ->> var _58e=dojo.html.getBorderBox(node).height;
comment:9 Changed 14 years ago by
diff :
-- dojo.js.uncompressed.js 2006-12-06 02:39:32.000000000 +0100 +++ dojo.js.uncompressed2.js 2007-01-15 20:14:32.406250000 +0100 @@ -9259,6 +9259,7 @@ var anims = []; dojo.lang.forEach(nodes, function(node){ + var height = dojo.html.getBorderBox(node).height; var oprop = { }; // old properties of node (before we mucked w/them) // get node height, either it's natural height or it's height specified via style or class attributes @@ -9270,7 +9271,7 @@ top="-9999px"; left="-9999px"; position="absolute"; display=""; } - var height = dojo.html.getBorderBox(node).height; + with(node.style){ top=origTop; left=origLeft; position=origPosition; display="none";
comment:10 Changed 14 years ago by
sorry , the fix is wrong... it fixes the test case i attached , but it broke my live projext ...
comment:11 Changed 14 years ago by
ok, ive revised my previous bad patch, this one is 100% OK , tersted in test case and live project in FF, opera, IE.
here is the CORRECT fix:
--- dojo.js.uncompressed.js 2006-12-06 02:39:32.000000000 +0100 +++ dojo.js.uncompressed2.js 2007-01-15 21:48:24.843750000 +0100 @@ -9260,7 +9260,9 @@ dojo.lang.forEach(nodes, function(node){ var oprop = { }; // old properties of node (before we mucked w/them) - + node.style.display=''; + var height=dojo.html.getBorderBox(node).height; + node.style.display='none'; // get node height, either it's natural height or it's height specified via style or class attributes // (for FF, the node has to be (temporarily) rendered to measure height) // TODO: should this offscreen code be part of dojo.html, so that getBorderBox() works on hidden nodes? @@ -9270,7 +9272,6 @@ top="-9999px"; left="-9999px"; position="absolute"; display=""; } - var height = dojo.html.getBorderBox(node).height; with(node.style){ top=origTop; left=origLeft; position=origPosition; display="none";
Changed 14 years ago by
Attachment: | dojo.lfx.html.wipeIn.patch added |
---|
final and CORRECT version of patch
comment:12 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
This was already fixed in [7000]. Not sure if it's the same fix as you suggested but try the latest and see if it's working for you.
comment:13 Changed 14 years ago by
ive built the latest nightly , it appears to behave the same as in my patch ;-) seems my help was unessessary :-)
good job :]
seems that more widgets like tabcontainer suffer from this bug...