Note that there are some explanatory texts on larger screens.

plurals
  1. PObounce bug on resize element and animate scrolltop/scrollleft
    primarykey
    data
    text
    <p>I developed the plugin ascensor.js (http://kirkas.ch/ascensor/) After rewriting it completely (whitout scrollto plugin) i experience some bug on the resize fonction.</p> <p>When you do it, there is some bounce effect (chrome) and you can see small part of other floor, i know that every browser have different resize effect, but i'm wondering if there's a way to fix it.</p> <p>Resize effect: Chrome/Safari/Firefox: small bounce and see other floor Opera: no resize effect until click up</p> <p>Here the full plugin : <a href="http://kirkas.ch/ascensor/js/jquery.ascensor.js" rel="nofollow">http://kirkas.ch/ascensor/js/jquery.ascensor.js</a></p> <p>And here the part about the resize fonction:</p> <pre><code>function resizeFloor(){ var WW=$(window).width(); var WH=$(window).height() if(params.Direction=='y'){$(node).stop().animate({scrollTop:(floor-1)*WH},1);} if(params.Direction=='x'){$(node).stop().animate({scrollLeft:(floor-1)*WW},1);} if(params.Direction=='chocolate'){ var target = AscensorMap[StageOn-1].split('|'); $(node).stop().animate({ scrollLeft:(target[1]-1)*WW, scrollTop:(target[0]-1)*WH },1); } $(node).height(WH).width(WW).children(params.ChildType).each(function(){ $(this).height(WH).width(WW); }); if(params.Direction=='x'){ $(node).children().css('position','absolute'); $(node).children().each(function(index){$(this).css('left',index*WW);}) } if(params.Direction=='chocolate'){ $(node).children(params.ChildType).each(function(index){ var CoordName = AscensorMap[index].split('|'); $(this).css({'position':'absolute', 'left':(CoordName[1]-1)*WW, 'top':(CoordName[0]-1)*WH}); }); } } </code></pre> <p>Also i'm quite new in JS development, so if you have any advice about syntax or critic about the system, i'm fully open.</p> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload