diff options
Diffstat (limited to 'js/panels')
-rwxr-xr-x | js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js | 8 | ||||
-rw-r--r-- | js/panels/presets/default-animation-presets.js | 48 |
2 files changed, 56 insertions, 0 deletions
diff --git a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js index 599eeda3..3505393c 100755 --- a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js +++ b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js | |||
@@ -297,6 +297,8 @@ var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component | |||
297 | styles[n] = defaultStyles[n]; | 297 | styles[n] = defaultStyles[n]; |
298 | } | 298 | } |
299 | } | 299 | } |
300 | |||
301 | instance.addEventListener('firstDraw', that, false); | ||
300 | 302 | ||
301 | that.application.ninja.currentDocument.setComponentInstance(instance, element); | 303 | that.application.ninja.currentDocument.setComponentInstance(instance, element); |
302 | 304 | ||
@@ -305,6 +307,12 @@ var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component | |||
305 | 307 | ||
306 | } | 308 | } |
307 | }, | 309 | }, |
310 | |||
311 | handleFirstDraw: { | ||
312 | value: function (e) { | ||
313 | NJevent("addComponentFirstDraw"); | ||
314 | } | ||
315 | }, | ||
308 | 316 | ||
309 | makeComponent: { | 317 | makeComponent: { |
310 | value: function(name) { | 318 | value: function(name) { |
diff --git a/js/panels/presets/default-animation-presets.js b/js/panels/presets/default-animation-presets.js index 2e656e86..64f91ea6 100644 --- a/js/panels/presets/default-animation-presets.js +++ b/js/panels/presets/default-animation-presets.js | |||
@@ -37,6 +37,54 @@ exports.animationPresets = { | |||
37 | }] | 37 | }] |
38 | }] | 38 | }] |
39 | }, { | 39 | }, { |
40 | "text": "2D Animations", | ||
41 | "children": [ | ||
42 | { | ||
43 | "text": "Slide Out with Fade", | ||
44 | "selectorBase": "slide-fade-out", | ||
45 | "rules" : [{ | ||
46 | "selectorSuffix" : "", | ||
47 | "styles" : { | ||
48 | "-webkit-animation-name": "slide-fade-out", | ||
49 | "-webkit-animation-duration": "5s", | ||
50 | "-webkit-animation-iteration-count": "infinite", | ||
51 | "-webkit-animation-direction": "normal", | ||
52 | "-webkit-animation-timing-function": "ease", | ||
53 | "-webkit-transform-style": "preserve-3d", | ||
54 | "-webkit-transform": "perspective(1000)", | ||
55 | "-webkit-animation-delay": "0s" | ||
56 | } | ||
57 | },{ | ||
58 | "isKeyFrameRule": true, | ||
59 | "keys" : [{ | ||
60 | "keyText": "0%", | ||
61 | "styles": { | ||
62 | "opacity": "0", | ||
63 | "-webkit-transform": "translate3d(0, 0, 0)" | ||
64 | } | ||
65 | }, { | ||
66 | "keyText": "10%", | ||
67 | "styles": { | ||
68 | "opacity": "1", | ||
69 | "-webkit-transform": "translate3d(0, 0, 0)" | ||
70 | } | ||
71 | }, { | ||
72 | "keyText": "86%", | ||
73 | "styles": { | ||
74 | "opacity": "1", | ||
75 | "-webkit-transform": "translate3d(0, 0, 0)" | ||
76 | |||
77 | } | ||
78 | }, { | ||
79 | "keyText": "100%", | ||
80 | "styles": { | ||
81 | "opacity": "0", | ||
82 | "-webkit-transform": "translate3d(540px, 0, 0)" | ||
83 | } | ||
84 | }] | ||
85 | }] | ||
86 | }] | ||
87 | }, { | ||
40 | "text": "3D Animations", | 88 | "text": "3D Animations", |
41 | "children": [ | 89 | "children": [ |
42 | { | 90 | { |