diff options
author | Jonathan Duran | 2012-04-05 08:09:18 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-04-05 08:09:18 -0700 |
commit | e186c49247689b5c2df6125037e2473636701d17 (patch) | |
tree | e626b006027949f87b5aa1e76eb0ed719adb99bb /js | |
parent | 135c5257e2a4d5f1b25f62758c6783fd2ebe5e19 (diff) | |
parent | 17ca01f54591187f5c0812c0fd2cb7260afa9639 (diff) | |
download | ninja-e186c49247689b5c2df6125037e2473636701d17.tar.gz |
Merge branch 'refs/heads/NINJAmaster' into TimelineUber
Diffstat (limited to 'js')
87 files changed, 10933 insertions, 14105 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index a308f191..0f02ca3c 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -32,9 +32,6 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
32 | _iframeHolder: { value: null, enumerable: false }, | 32 | _iframeHolder: { value: null, enumerable: false }, |
33 | _textHolder: { value: null, enumerable: false }, | 33 | _textHolder: { value: null, enumerable: false }, |
34 | _codeMirrorCounter: {value: 1, enumerable: false}, | 34 | _codeMirrorCounter: {value: 1, enumerable: false}, |
35 | |||
36 | canSave:{value: false},//for Save menu state update | ||
37 | canSaveAll:{value: false},//for Save All menu state update | ||
38 | 35 | ||
39 | activeDocument: { | 36 | activeDocument: { |
40 | get: function() { | 37 | get: function() { |
@@ -50,12 +47,6 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
50 | if(!!this._activeDocument.editor){ | 47 | if(!!this._activeDocument.editor){ |
51 | this._activeDocument.editor.focus(); | 48 | this._activeDocument.editor.focus(); |
52 | } | 49 | } |
53 | |||
54 | this.canSave = doc.needsSave; | ||
55 | this.canSaveAll = doc.needsSave; | ||
56 | }else{ | ||
57 | this.canSave = false; | ||
58 | this.canSaveAll = false; | ||
59 | } | 50 | } |
60 | } | 51 | } |
61 | }, | 52 | }, |
diff --git a/js/controllers/presets-controller.js b/js/controllers/presets-controller.js index 0467f73c..975f9f7a 100644 --- a/js/controllers/presets-controller.js +++ b/js/controllers/presets-controller.js | |||
@@ -20,14 +20,39 @@ exports.PresetsController = Montage.create(Component, { | |||
20 | 20 | ||
21 | addTransition: { | 21 | addTransition: { |
22 | value: function(element) { | 22 | value: function(element) { |
23 | var transitionDuration; | ||
24 | |||
23 | element.classList.add(this.transitionClass); | 25 | element.classList.add(this.transitionClass); |
24 | element.addEventListener("webkitTransitionEnd", this, true); | 26 | element.addEventListener("webkitTransitionEnd", this, true); |
27 | |||
28 | |||
29 | //// TODO: replace this hack when webkit supports transitionStart event | ||
30 | transitionDuration = this.application.ninja.stylesController.getElementStyle(element, '-webkit-transition-duration', true); | ||
31 | element.njTimeout = window.setTimeout(function() { | ||
32 | this.captureWebkitTransitionEnd({ | ||
33 | 'target': element | ||
34 | }); | ||
35 | }.bind(this), this._getMilliseconds(transitionDuration) + 100); | ||
36 | } | ||
37 | }, | ||
38 | |||
39 | _getMilliseconds : { | ||
40 | value: function(duration) { | ||
41 | if(duration.indexOf('ms') !== -1) { | ||
42 | return parseInt(duration); | ||
43 | } else { | ||
44 | return parseFloat(duration)*1000; | ||
45 | } | ||
25 | } | 46 | } |
26 | }, | 47 | }, |
27 | 48 | ||
28 | captureWebkitTransitionEnd : { | 49 | captureWebkitTransitionEnd : { |
29 | value : function(e) { | 50 | value : function(e) { |
30 | var el = e.target; | 51 | var el = e.target; |
52 | |||
53 | //// TODO: replace this hack when webkit supports transitionStart event (see above) | ||
54 | window.clearTimeout(el.njTimeout); | ||
55 | |||
31 | el.classList.remove(this.transitionClass); |