Changeset View
Changeset View
Standalone View
Standalone View
effects/morphingpopups/package/contents/code/morphingpopups.js
Show All 32 Lines | 29 | geometryChange: function (window, oldGeometry) { | |||
---|---|---|---|---|---|
33 | } | 33 | } | ||
34 | 34 | | |||
35 | var newGeometry = window.geometry; | 35 | var newGeometry = window.geometry; | ||
36 | 36 | | |||
37 | //only do the transition for near enough tooltips, | 37 | //only do the transition for near enough tooltips, | ||
38 | //don't cross the whole screen: ugly | 38 | //don't cross the whole screen: ugly | ||
39 | var distance = Math.abs(oldGeometry.x - newGeometry.x) + Math.abs(oldGeometry.y - newGeometry.y); | 39 | var distance = Math.abs(oldGeometry.x - newGeometry.x) + Math.abs(oldGeometry.y - newGeometry.y); | ||
40 | 40 | | |||
41 | if (newGeometry.x == oldGeometry.x && | ||||
42 | newGeometry.y == oldGeometry.y && | ||||
43 | newGeometry.width == oldGeometry.width && | ||||
44 | newGeometry.height == oldGeometry.height) { | ||||
45 | return; | ||||
46 | } | ||||
47 | | ||||
41 | if (distance > (newGeometry.width + newGeometry.height) * 2) { | 48 | if (distance > (newGeometry.width + newGeometry.height) * 2) { | ||
42 | if (window.moveAnimation) { | 49 | if (window.moveAnimation) { | ||
43 | delete window.moveAnimation; | 50 | delete window.moveAnimation; | ||
44 | } | 51 | } | ||
45 | if (window.fadeAnimation) { | 52 | if (window.fadeAnimation) { | ||
46 | delete window.fadeAnimation; | 53 | delete window.fadeAnimation; | ||
47 | } | 54 | } | ||
48 | 55 | | |||
▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines |