diff options
-rw-r--r-- | README.md | 4 | ||||
-rwxr-xr-x | js/panels/color/colorpopup-manager.js | 26 |
2 files changed, 21 insertions, 9 deletions
@@ -25,13 +25,13 @@ If you're already familiar with using Git, GitHub, you can clone master branch o | |||
25 | - Browse to HKEY_CURRENT_USER/Software/Motorola Mobility/Ninja Local Cloud/Options. | 25 | - Browse to HKEY_CURRENT_USER/Software/Motorola Mobility/Ninja Local Cloud/Options. |
26 | - Right click and select New > String value. | 26 | - Right click and select New > String value. |
27 | - Type 'Local Ninja Origin' no quotes. | 27 | - Type 'Local Ninja Origin' no quotes. |
28 | - Double click on Local Ninja Origin and paste in the Ninja app ID copied in step 6 from the Chrome extensions page in the Value data field. | 28 | - Double click on Local Ninja Origin and paste in the Ninja app ID copied in step 6 from the Chrome extensions page in the Value data field. To have multiple builds of Ninja installed but not running simultaneously as this is not supported, multiple app IDs can be added separated by comma and no space. |
29 | - Close Registry Editor. | 29 | - Close Registry Editor. |
30 | 8. On Mac: | 30 | 8. On Mac: |
31 | - Launch Finder. | 31 | - Launch Finder. |
32 | - Double click on /Users/\<user\>/Library/Preferences/com.MotorolaMobility.Ninja-Local-Cloud.plist. Note: on Lion (10.7), user library folder is hidden by default. To browse to it, in Finder choose Go > Go to Folder and type ~/Library, or select Go menu with Alt (Option) key down to see Library listed in Go menu or make the user library folder permanently visible by running the following command in Terminal: chflags nohidden ~/Library | 32 | - Double click on /Users/\<user\>/Library/Preferences/com.MotorolaMobility.Ninja-Local-Cloud.plist. Note: on Lion (10.7), user library folder is hidden by default. To browse to it, in Finder choose Go > Go to Folder and type ~/Library, or select Go menu with Alt (Option) key down to see Library listed in Go menu or make the user library folder permanently visible by running the following command in Terminal: chflags nohidden ~/Library |
33 | - Click on Add Child Type 'Local Ninja Origin' no quotes. | 33 | - Click on Add Child Type 'Local Ninja Origin' no quotes. |
34 | - For value, paste in the Ninja app ID copied in step 6 from the Chrome extensions page. | 34 | - For value, paste in the Ninja app ID copied in step 6 from the Chrome extensions page. To have multiple builds of Ninja installed but not running simultaneously as this is not supported, multiple app IDs can be added separated by comma and no space. |
35 | - Save (File > Save or Cmd S). | 35 | - Save (File > Save or Cmd S). |
36 | - Close Property List Editor. | 36 | - Close Property List Editor. |
37 | 9. Quit Ninja Local Cloud | 37 | 9. Quit Ninja Local Cloud |
diff --git a/js/panels/color/colorpopup-manager.js b/js/panels/color/colorpopup-manager.js index 7b18b011..cca9c340 100755 --- a/js/panels/color/colorpopup-manager.js +++ b/js/panels/color/colorpopup-manager.js | |||
@@ -284,7 +284,13 @@ exports.ColorPopupManager = Montage.create(Component, { | |||
284 | cvs = this._popupChipBtn.getElementsByTagName('canvas')[0], | 284 | cvs = this._popupChipBtn.getElementsByTagName('canvas')[0], |
285 | rgb = this._popupChipBase.colorManager.rgb, | 285 | rgb = this._popupChipBase.colorManager.rgb, |
286 | hsl = this._popupChipBase.colorManager.hsl, | 286 | hsl = this._popupChipBase.colorManager.hsl, |
287 | alpha = this._popupChipBase.colorManager.alpha.value || this._popupChipBase.colorManager.alpha; | 287 | alpha; |
288 | //Checking for alpha value | ||
289 | if (!isNaN(this._popupChipBase.colorManager.alpha.value)) { | ||
290 | alpha = this._popupChipBase.colorManager.alpha.value; | ||
291 | } else if (!isNaN(this._popupChipBase.colorManager.alpha)){ | ||
292 | alpha = this._popupChipBase.colorManager.alpha; | ||
293 | } | ||
288 | // | 294 | // |
289 | this._popupChipBase._components.hex.value = this._popupChipBase.colorManager.hex; | 295 | this._popupChipBase._components.hex.value = this._popupChipBase.colorManager.hex; |
290 | // | 296 | // |
@@ -312,13 +318,13 @@ exports.ColorPopupManager = Montage.create(Component, { | |||
312 | } | 318 | } |
313 | // | 319 | // |
314 | if (rgb) { | 320 | if (rgb) { |
315 | if (alpha) { | 321 | if (!isNaN(alpha)) { |
316 | this._popupChipBtn.color('rgb', {r: rgb.r, g: rgb.g, b: rgb.b, a: alpha, css: 'rgba('+rgb.r+', '+rgb.g+', '+rgb.b+', '+alpha+')'}); | 322 | this._popupChipBtn.color('rgb', {r: rgb.r, g: rgb.g, b: rgb.b, a: alpha, css: 'rgba('+rgb.r+', '+rgb.g+', '+rgb.b+', '+alpha+')'}); |
317 | } else { | 323 | } else { |
318 | this._popupChipBtn.color('rgb', {r: rgb.r, g: rgb.g, b: rgb.b, a: 1, css: 'rgba('+rgb.r+', '+rgb.g+', '+rgb.b+', 1)'}); | 324 | this._popupChipBtn.color('rgb', {r: rgb.r, g: rgb.g, b: rgb.b, a: 1, css: 'rgba('+rgb.r+', '+rgb.g+', '+rgb.b+', 1)'}); |
319 | } | 325 | } |
320 | } else if (!(e._event.mode && e._event.mode === 'nocolor')) { | 326 | } else if (!(e._event.mode && e._event.mode === 'nocolor')) { |
321 | if (alpha) { | 327 | if (!isNaN(alpha)) { |
322 | this._popupChipBtn.color('rgb', {r: 255, g: 255, b: 255, a: alpha, css: 'rgba(255, 255, 255, '+alpha+')'}); | 328 | this._popupChipBtn.color('rgb', {r: 255, g: 255, b: 255, a: alpha, css: 'rgba(255, 255, 255, '+alpha+')'}); |
323 | } else { | 329 | } else { |
324 | this._popupChipBtn.color('rgb', {r: 255, g: 255, b: 255, a: 1, css: 'rgba(255, 255, 255, 1)'}); | 330 | this._popupChipBtn.color('rgb', {r: 255, g: 255, b: 255, a: 1, css: 'rgba(255, 255, 255, 1)'}); |
@@ -339,7 +345,13 @@ exports.ColorPopupManager = Montage.create(Component, { | |||
339 | cvs = this._popupGradientChipBtn.getElementsByTagName('canvas')[0], | 345 | cvs = this._popupGradientChipBtn.getElementsByTagName('canvas')[0], |
340 | rgb = this._popupGradientChipBase.colorManager.rgb, | 346 | rgb = this._popupGradientChipBase.colorManager.rgb, |
341 | hsl = this._popupGradientChipBase.colorManager.hsl, | 347 | hsl = this._popupGradientChipBase.colorManager.hsl, |
342 | alpha = this._popupGradientChipBase.colorManager.alpha.value || this._popupGradientChipBase.colorManager.alpha; | 348 | alpha; |
349 | //Checking for alpha value | ||
350 | if (!isNaN(this._popupGradientChipBase.colorManager.alpha.value)) { | ||
351 | alpha = this._popupGradientChipBase.colorManager.alpha.value; | ||
352 | } else if (!isNaN(this._popupGradientChipBase.colorManager.alpha)){ | ||
353 | alpha = this._popupGradientChipBase.colorManager.alpha; | ||
354 | } | ||
343 | // | 355 | // |
344 | this._popupGradientChipBase._components.hex.value = this._popupGradientChipBase.colorManager.hex; | 356 | this._popupGradientChipBase._components.hex.value = this._popupGradientChipBase.colorManager.hex; |
345 | // | 357 | // |
@@ -367,13 +379,13 @@ exports.ColorPopupManager = Montage.create(Component, { | |||
367 | } | 379 | } |
368 | // | 380 | // |
369 | if (rgb) { | 381 | if (rgb) { |
370 | if (alpha) { | 382 | if (!isNaN(alpha)) { |
371 | this._popupGradientChipBtn.color('rgb', {r: rgb.r, g: rgb.g, b: rgb.b, a: alpha, css: 'rgba('+rgb.r+', '+rgb.g+', '+rgb.b+', '+alpha+')'}); | 383 | this._popupGradientChipBtn.color('rgb', {r: rgb.r, g: rgb.g, b: rgb.b, a: alpha, css: 'rgba('+rgb.r+', '+rgb.g+', '+rgb.b+', '+alpha+')'}); |
372 | } else { | 384 | } else { |
373 | this._popupGradientChipBtn.color('rgb', {r: rgb.r, g: rgb.g, b: rgb.b, a: 1, css: 'rgba('+rgb.r+', '+rgb.g+', '+rgb.b+', 1)'}); | 385 | this._popupGradientChipBtn.color('rgb', {r: rgb.r, g: rgb.g, b: rgb.b, a: 1, css: 'rgba('+rgb.r+', '+rgb.g+', '+rgb.b+', 1)'}); |
374 | } | 386 | } |
375 | } else { | 387 | } else { |
376 | if (alpha) { | 388 | if (!isNaN(alpha)) { |
377 | this._popupGradientChipBtn.color('rgb', {r: 255, g: 255, b: 255, a: alpha, css: 'rgba(255, 255, 255, '+alpha+')'}); | 389 | this._popupGradientChipBtn.color('rgb', {r: 255, g: 255, b: 255, a: alpha, css: 'rgba(255, 255, 255, '+alpha+')'}); |
378 | } else { | 390 | } else { |
379 | this._popupGradientChipBtn.color('rgb', {r: 255, g: 255, b: 255, a: 1, css: 'rgba(255, 255, 255, 1)'}); | 391 | this._popupGradientChipBtn.color('rgb', {r: 255, g: 255, b: 255, a: 1, css: 'rgba(255, 255, 255, 1)'}); |
@@ -615,7 +627,7 @@ exports.ColorPopupManager = Montage.create(Component, { | |||
615 | hsv = this.colorManager.rgbToHsv(color.r, color.g, color.b); | 627 | hsv = this.colorManager.rgbToHsv(color.r, color.g, color.b); |
616 | } | 628 | } |
617 | // | 629 | // |
618 | if (color && color.a && !e._target.base.props.panel) { | 630 | if (color && !isNaN(color.a) && !e._target.base.props.panel) { |
619 | e._target.base.colorManager.alpha = color.a; | 631 | e._target.base.colorManager.alpha = color.a; |
620 | e._target.base._components.combo.slider.value = color.a*100; | 632 | e._target.base._components.combo.slider.value = color.a*100; |
621 | } else if (!e._target.base.props.panel){ | 633 | } else if (!e._target.base.props.panel){ |