diff options
author | Armen Kesablyan | 2012-07-02 13:20:43 -0700 |
---|---|---|
committer | Armen Kesablyan | 2012-07-02 13:20:43 -0700 |
commit | 5a6b1fcf207817a7aa0ba7d0c1bea90f0ee5e8cb (patch) | |
tree | af71b72b828d942ebf11f565b7c9ccff0798343d | |
parent | 8966fc4903f0eec61816d9b9bdbcac9b7d99c320 (diff) | |
parent | 526b9d76686323f488f1b26175440172b715d808 (diff) | |
download | ninja-5a6b1fcf207817a7aa0ba7d0c1bea90f0ee5e8cb.tar.gz |
Merge branch 'refs/heads/master' into GIO-TextTool
64 files changed, 1157 insertions, 1980 deletions
diff --git a/js/clipboard/internal-ops/elements-clipboard-agent.js b/js/clipboard/internal-ops/elements-clipboard-agent.js index cd8de46e..1a4bfdba 100644 --- a/js/clipboard/internal-ops/elements-clipboard-agent.js +++ b/js/clipboard/internal-ops/elements-clipboard-agent.js | |||
@@ -232,7 +232,8 @@ var ElementsClipboardAgent = exports.ElementsClipboardAgent = Montage.create(Com | |||
232 | canvas.height = sourceCanvas.height; | 232 | canvas.height = sourceCanvas.height; |
233 | //end - clone copied canvas | 233 | //end - clone copied canvas |
234 | 234 | ||
235 | if (!canvas.getAttribute( "data-RDGE-id" )) canvas.setAttribute( "data-RDGE-id", document.application.njUtils.generateRandom() ); | 235 | //genenerate data-RDGE-id only for shapes |
236 | if (sourceCanvas.elementModel.shapeModel && !canvas.getAttribute( "data-RDGE-id" )) canvas.setAttribute( "data-RDGE-id", document.application.njUtils.generateRandom() ); | ||
236 | 237 | ||
237 | if(sourceCanvas.ownerDocument.defaultView.getComputedStyle(sourceCanvas).getPropertyValue("position") === "absolute"){ | 238 | if(sourceCanvas.ownerDocument.defaultView.getComputedStyle(sourceCanvas).getPropertyValue("position") === "absolute"){ |
238 | styles = canvas.elementModel.data || {}; | 239 | styles = canvas.elementModel.data || {}; |
@@ -275,7 +276,8 @@ var ElementsClipboardAgent = exports.ElementsClipboardAgent = Montage.create(Com | |||
275 | canvas.width = styles.width; | 276 | canvas.width = styles.width; |
276 | canvas.height = styles.height; | 277 | canvas.height = styles.height; |
277 | 278 | ||
278 | if (!canvas.getAttribute( "data-RDGE-id" )) canvas.setAttribute( "data-RDGE-id", document.application.njUtils.generateRandom() ); | 279 | //genenerate data-RDGE-id only for shapes |
280 | if (worldJson && !canvas.getAttribute( "data-RDGE-id" )) canvas.setAttribute( "data-RDGE-id", document.application.njUtils.generateRandom() ); | ||
279 | 281 | ||
280 | this.pastePositioned(canvas, styles, false/*from copy*/); | 282 | this.pastePositioned(canvas, styles, false/*from copy*/); |
281 | 283 | ||
diff --git a/js/components/gradientpicker.reel/gradientpicker.js b/js/components/gradientpicker.reel/gradientpicker.js index 6071f3c6..f912eb51 100755 --- a/js/components/gradientpicker.reel/gradientpicker.js +++ b/js/components/gradientpicker.reel/gradientpicker.js | |||
@@ -43,7 +43,7 @@ exports.GradientPicker = Montage.create(Component, { | |||
43 | get: function() {return this._mode;}, | 43 | get: function() {return this._mode;}, |
44 | set: function(value) { | 44 | set: function(value) { |
45 | // | 45 | // |
46 | this.application.ninja.colorController.colorPopupManager.hideColorChipPopup(); | 46 | this.application.ninja.colorController.colorPopupManager.hideGradientChipPopup(); |
47 | // | 47 | // |
48 | this._mode = value; | 48 | this._mode = value; |
49 | // | 49 | // |
@@ -132,7 +132,7 @@ exports.GradientPicker = Montage.create(Component, { | |||
132 | value: function(data, silent) { | 132 | value: function(data, silent) { |
133 | if (this.application.ninja.colorController.colorPopupManager) { | 133 | if (this.application.ninja.colorController.colorPopupManager) { |
134 | //Hiding any open popups (of gradient buttons) | 134 | //Hiding any open popups (of gradient buttons) |
135 | this.application.ninja.colorController.colorPopupManager.hideColorChipPopup(); | 135 | this.application.ninja.colorController.colorPopupManager.hideGradientChipPopup(); |
136 | //Creating stop elements | 136 | //Creating stop elements |
137 | var stop = document.createElement('div'), | 137 | var stop = document.createElement('div'), |
138 | holder = document.createElement('div'), | 138 | holder = document.createElement('div'), |
@@ -147,6 +147,7 @@ exports.GradientPicker = Montage.create(Component, { | |||
147 | stop.addEventListener('mouseup', this, false); | 147 | stop.addEventListener('mouseup', this, false); |
148 | //Storing refereces to buttons and actual stop container | 148 | //Storing refereces to buttons and actual stop container |
149 | button.stop = stop; | 149 | button.stop = stop; |
150 | tooltip.stop = stop; | ||
150 | stop.button = button; | 151 | stop.button = button; |
151 | //Adding stop to container | 152 | //Adding stop to container |
152 | this.trackChips.appendChild(stop); | 153 | this.trackChips.appendChild(stop); |
@@ -160,7 +161,7 @@ exports.GradientPicker = Montage.create(Component, { | |||
160 | //Initialing button with color data | 161 | //Initialing button with color data |
161 | button.color(data.color.mode, data.color.value); | 162 | button.color(data.color.mode, data.color.value); |
162 | //Button popup data | 163 | //Button popup data |
163 | button.props = {side: 'top', align: 'center', nocolor: false, wheel: true, palette: true, gradient: false, image: false, offset: -84, panel: true}; | 164 | button.props = {side: 'top', align: 'center', nocolor: false, wheel: true, palette: false, gradient: false, image: false, offset: -84, gradientPopup: true, history: false}; |
164 | //Listening for color events from button | 165 | //Listening for color events from button |
165 | button.addEventListener('change', this, false); | 166 | button.addEventListener('change', this, false); |
166 | //Dispatching event depending on type of mode | 167 | //Dispatching event depending on type of mode |
@@ -263,7 +264,7 @@ exports.GradientPicker = Montage.create(Component, { | |||
263 | // | 264 | // |
264 | this._updating = true; | 265 | this._updating = true; |
265 | // | 266 | // |
266 | this.application.ninja.colorController.colorPopupManager.hideColorChipPopup(); | 267 | this.application.ninja.colorController.colorPopupManager.hideGradientChipPopup(); |
267 | // | 268 | // |
268 | if (e._event.y > this._trackData.y+70 || e._event.y < this._trackData.y) { | 269 | if (e._event.y > this._trackData.y+70 || e._event.y < this._trackData.y) { |
269 | this.removeStop(this.currentStop); | 270 | this.removeStop(this.currentStop); |
diff --git a/js/components/layout/stage-mode.reel/stage-mode.js b/js/components/layout/stage-mode.reel/stage-mode.js index cb42276b..b772d688 100755 --- a/js/components/layout/stage-mode.reel/stage-mode.js +++ b/js/components/layout/stage-mode.reel/stage-mode.js | |||
@@ -9,17 +9,17 @@ var Montage = require("montage/core/core").Montage, | |||
9 | 9 | ||
10 | exports.StageMode = Montage.create(Component, { | 10 | exports.StageMode = Montage.create(Component, { |
11 | 11 | ||
12 | _livePreview: { | 12 | _chromePreview: { |
13 | value: null | 13 | value: null |
14 | }, | 14 | }, |
15 | 15 | ||
16 | livePreview: { | 16 | chromePreview: { |
17 | get: function() { | 17 | get: function() { |