diff options
Diffstat (limited to 'js')
57 files changed, 1562 insertions, 731 deletions
diff --git a/js/clipboard/internal-ops/elements-clipboard-agent.js b/js/clipboard/internal-ops/elements-clipboard-agent.js index 5c4b7d6f..4f6e8195 100644 --- a/js/clipboard/internal-ops/elements-clipboard-agent.js +++ b/js/clipboard/internal-ops/elements-clipboard-agent.js | |||
@@ -267,7 +267,10 @@ var ElementsClipboardAgent = exports.ElementsClipboardAgent = Montage.create(Com | |||
267 | styles = null; | 267 | styles = null; |
268 | } | 268 | } |
269 | 269 | ||
270 | var addDelegate = this.application.ninja.elementMediator.addDelegate; | ||
271 | this.application.ninja.elementMediator.addDelegate = null; | ||
270 | this.application.ninja.elementMediator.addElements(canvas, styles, false); | 272 | this.application.ninja.elementMediator.addElements(canvas, styles, false); |
273 | this.application.ninja.elementMediator.addDelegate = addDelegate; | ||
271 | 274 | ||
272 | worldData = sourceCanvas.elementModel.shapeModel ? sourceCanvas.elementModel.shapeModel.GLWorld.exportJSON(): null; | 275 | worldData = sourceCanvas.elementModel.shapeModel ? sourceCanvas.elementModel.shapeModel.GLWorld.exportJSON(): null; |
273 | if(worldData) | 276 | if(worldData) |
@@ -349,7 +352,7 @@ var ElementsClipboardAgent = exports.ElementsClipboardAgent = Montage.create(Com | |||
349 | 352 | ||
350 | pastePositioned:{ | 353 | pastePositioned:{ |
351 | value: function(element, styles, fromCopy){// for now can wok for both in-place and centered paste | 354 | value: function(element, styles, fromCopy){// for now can wok for both in-place and centered paste |
352 | var modObject = [], x,y, newX, newY, counter; | 355 | var modObject = [], x,y, newX, newY, counter, self = this; |
353 | 356 | ||
354 | if((typeof fromCopy === "undefined") || (fromCopy && fromCopy === true)){ | 357 | if((typeof fromCopy === "undefined") || (fromCopy && fromCopy === true)){ |
355 | counter = this.pasteCounter; | 358 | counter = this.pasteCounter; |
@@ -362,11 +365,22 @@ var ElementsClipboardAgent = exports.ElementsClipboardAgent = Montage.create(Com | |||
362 | newX = styles ? ("" + (styles.left + (25 * counter)) + "px") : "100px"; | 365 | newX = styles ? ("" + (styles.left + (25 * counter)) + "px") : "100px"; |
363 | newY = styles ? ("" + (styles.top + (25 * counter)) + "px") : "100px"; | 366 | newY = styles ? ("" + (styles.top + (25 * counter)) + "px") : "100px"; |
364 | 367 | ||
368 | var addDelegate = this.application.ninja.elementMediator.addDelegate; | ||
369 | this.application.ninja.elementMediator.addDelegate = null; | ||
365 | if(!styles || (styles && !styles.position)){ | 370 | if(!styles || (styles && !styles.position)){ |
366 | this.application.ninja.elementMediator.addElements(element, null, false); | 371 | this.application.ninja.elementMediator.addElements(element, null, false); |
367 | }else if(styles && (styles.position === "absolute")){ | 372 | }else if(styles && (styles.position === "absolute")){ |
373 | if((element.tagName === "IMG") || (element.getAttribute("type") === "image/svg+xml")){ | ||
374 | element.onload = function(){ | ||
375 | element.onload = null; | ||
376 | //refresh selection | ||
377 | self.application.ninja.stage.needsDraw = true; | ||
378 | } | ||
379 | } | ||
380 | |||
368 | this.application.ninja.elementMediator.addElements(element, {"top" : newY, "left" : newX}, false);//displace | 381 | this.application.ninja.elementMediator.addElements(element, {"top" : newY, "left" : newX}, false);//displace |
369 | } | 382 | } |
383 | this.application.ninja.elementMediator.addDelegate = addDelegate; | ||
370 | } | 384 | } |
371 | }, | 385 | }, |
372 | 386 | ||
diff --git a/js/components/gradientpicker.reel/gradientpicker.js b/js/components/gradientpicker.reel/gradientpicker.js index f35a1fff..6e239f7d 100755 --- a/js/components/gradientpicker.reel/gradientpicker.js +++ b/js/components/gradientpicker.reel/gradientpicker.js | |||
@@ -172,6 +172,7 @@ exports.GradientPicker = Montage.create(Component, { | |||
172 | //Storing refereces to buttons and actual stop container | 172 | //Storing refereces to buttons and actual stop container |
173 | button.stop = stop; | 173 | button.stop = stop; |
174 | tooltip.stop = stop; | 174 | tooltip.stop = stop; |
175 | holder.stop = stop; | ||
175 | stop.button = button; | 176 | stop.button = button; |
176 | //Adding stop to container | 177 | //Adding stop to container |
177 | this.trackChips.appendChild(stop); | 178 | this.trackChips.appendChild(stop); |
diff --git a/js/components/menu/menu-entry.reel/menu-entry.js b/js/components/menu/menu-entry.reel/menu-entry.js index 17f847d4..6c49af8f 100755 --- a/js/components/menu/menu-entry.reel/menu-entry.js +++ b/js/components/menu/menu-entry.reel/menu-entry.js | |||
@@ -102,10 +102,21 @@ exports.MenuEntry = Montage.create(Component, { | |||
102 | } | 102 | } |
103 | }, | 103 | }, |
104 | 104 | ||
105 | toggleOnMenuItemAction: { | ||
106 | value: function() { | ||
107 | // TODO: Hack! Rework this! | ||
108 | //for non menu headers only | ||
109 | this.parentComponent.ownerComponent.toggleActivation(this); | ||
110 | } | ||
111 | }, | ||
112 | |||
105 | captureMousedown: { | 113 | captureMousedown: { |
106 | value: function(event) { | 114 | value: function(event) { |
107 | // TODO: Hack! Rework this! | 115 | // TODO: Hack! Rework this! |
108 | this.parentComponent.ownerComponent.toggleActivation(this); | 116 | //for menu headers only |
117 | if(event.target.getAttribute("data-montage-id") === "topHeaderText"){ | ||
118 | this.parentComponent.ownerComponent.toggleActivation(this); | ||
119 | } | ||
109 | } | 120 | } |
110 | }, | 121 | }, |
111 | 122 | ||
diff --git a/js/components/menu/menu-item.reel/menu-item.css b/js/components/menu/menu-item.reel/menu-item.css index 298d706d..59f04675 100755 --- a/js/components/menu/menu-item.reel/menu-item.css +++ b/js/components/menu/menu-item.reel/menu-item.css | |||
@@ -33,10 +33,12 @@ POSSIBILITY OF SUCH DAMAGE. | |||
33 | font-size: 10pt; | 33 | font-size: 10pt; |
34 | padding: 3px 12px 3px 8px; | 34 | padding: 3px 12px 3px 8px; |
35 | text-shadow : 1px 1px 1px #000000; | 35 | text-shadow : 1px 1px 1px #000000; |
36 | cursor:pointer; | ||
36 | } | 37 | } |
37 | 38 | ||
38 | .menuItem:hover { | 39 | .menuItem:hover { |
39 | background-color: #7f7f7f; |