aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/components/gradientpicker.reel/gradientpicker.js2
-rwxr-xr-xjs/controllers/color-controller.js4
-rwxr-xr-xjs/data/pi/pi-data.js22
-rw-r--r--js/io/system/ninjalibrary.js4
-rwxr-xr-xjs/panels/Color/colorpanelpopup.reel/colorpanelpopup.js13
5 files changed, 21 insertions, 24 deletions
diff --git a/js/components/gradientpicker.reel/gradientpicker.js b/js/components/gradientpicker.reel/gradientpicker.js
index 0940be3c..da4e8c0f 100755
--- a/js/components/gradientpicker.reel/gradientpicker.js
+++ b/js/components/gradientpicker.reel/gradientpicker.js
@@ -397,7 +397,7 @@ exports.GradientPicker = Montage.create(Component, {
397 actionEvent.initEvent(type, true, true); 397 actionEvent.initEvent(type, true, true);
398 actionEvent.type = type; 398 actionEvent.type = type;
399 actionEvent.wasSetByCode = userInitiated; 399 actionEvent.wasSetByCode = userInitiated;
400 actionEvent.gradient = {stops: this.value, mode: this.mode, css: css}; 400 actionEvent.gradient = {stops: this.value, mode: this.mode, gradientMode: this.mode, css: css};
401 this.dispatchEvent(actionEvent); 401 this.dispatchEvent(actionEvent);
402 } 402 }
403 } 403 }
diff --git a/js/controllers/color-controller.js b/js/controllers/color-controller.js
index a6e41dd3..53573baf 100755
--- a/js/controllers/color-controller.js
+++ b/js/controllers/color-controller.js
@@ -259,6 +259,7 @@ exports.ColorController = Montage.create(Component, {
259 //Radial gradient 259 //Radial gradient
260 gradient.stops = []; 260 gradient.stops = [];
261 gradient.mode = 'radial'; 261 gradient.mode = 'radial';
262 gradient.gradientMode = 'radial';
262 gradient.css = css; 263 gradient.css = css;
263 // 264 //
264 arr = css.split('%,'); 265 arr = css.split('%,');
@@ -284,6 +285,7 @@ exports.ColorController = Montage.create(Component, {
284 //Linear gradient 285 //Linear gradient
285 gradient.stops = []; 286 gradient.stops = [];
286 gradient.mode = 'linear'; 287 gradient.mode = 'linear';
288 gradient.gradientMode = 'linear';
287 gradient.css = css; 289 gradient.css = css;
288 // 290 //
289 arr = css.split('from('); 291 arr = css.split('from(');
@@ -317,7 +319,7 @@ exports.ColorController = Montage.create(Component, {
317 } 319 }
318 } 320 }
319 //Creating gradient object 321 //Creating gradient object
320 color = {mode: 'gradient', value: {stops: gradient.stops, mode: gradient.mode, css: css}}; 322 color = {mode: 'gradient', value: {stops: gradient.stops, mode: gradient.mode, gradientMode: gradient.gradientMode, css: css}};
321 } else if (css){ 323 } else if (css){
322 //Simple solid color 324 //Simple solid color
323 color = this.parseCssToColor(css); 325 color = this.parseCssToColor(css);
diff --git a/js/data/pi/pi-data.js b/js/data/pi/pi-data.js
index ba03c347..c42d9082 100755
--- a/js/data/pi/pi-data.js
+++ b/js/data/pi/pi-data.js
@@ -331,11 +331,10 @@ exports.PiData = Montage.create( Montage, {
331 id: "tlRadius", 331 id: "tlRadius",
332 prop : "tlRadius", 332 prop : "tlRadius",
333 label: "TL", 333 label: "TL",
334 valueMutator: parseFloat,
335 value : 0, 334 value : 0,
336 min : 0, 335 min : 0,
337 max : 100, 336 max : 100,
338 unit : "px", 337 unit : "%",
339 acceptableUnits: ["px", "pt", "%"] 338 acceptableUnits: ["px", "pt", "%"]
340 }, 339 },
341 { 340 {
@@ -343,12 +342,10 @@ exports.PiData = Montage.create( Montage, {
343 id : "trRadius", 342 id : "trRadius",
344 prop : "trRadius", 343 prop : "trRadius",
345 label : "TR", 344 label : "TR",
346 valueMutator: parseFloat,
347 min : 0, 345 min : 0,
348 max : 100, 346 max : 100,
349 unit : "px", 347 unit : "%",
350 acceptableUnits: ["px", "pt", "%"], 348 acceptableUnits: ["px", "pt", "%"]
351 divider: true
352 } 349 }
353 ], 350 ],
354 [ 351 [
@@ -357,10 +354,9 @@ exports.PiData = Montage.create( Montage, {
357 id : "blRadius", 354 id : "blRadius",
358 prop : "blRadius", 355 prop : "blRadius",
359 label : "BL", 356 label : "BL",
360 valueMutator: parseFloat,
361 min : 0, 357 min : 0,
362 max : 100, 358 max : 100,
363 unit : "px", 359 unit : "%",
364 acceptableUnits: ["px", "pt", "%"] 360 acceptableUnits: ["px", "pt", "%"]
365 }, 361 },
366 { 362 {
@@ -368,10 +364,9 @@ exports.PiData = Montage.create( Montage, {
368 id : "brRadius", 364 id : "brRadius",
369 prop : "brRadius", 365 prop : "brRadius",
370 label : "BR", 366 label : "BR",
371 valueMutator: parseFloat,
372 min : 0, 367 min : 0,
373 max : 100, 368 max : 100,
374 unit : "px", 369 unit : "%",
375 acceptableUnits: ["px", "pt", "%"] 370 acceptableUnits: ["px", "pt", "%"]
376 } 371 }
377 ] 372 ]
@@ -395,7 +390,6 @@ exports.PiData = Montage.create( Montage, {
395 { 390 {
396 type: "dropdown", 391 type: "dropdown",
397 id: "strokeMaterial", 392 id: "strokeMaterial",
398 prop: "strokeMaterial",
399 label: "Stroke", 393 label: "Stroke",
400 labelField: "_name", 394 labelField: "_name",
401 dataField: "_name", 395 dataField: "_name",
@@ -408,7 +402,6 @@ exports.PiData = Montage.create( Montage, {
408 { 402 {
409 type: "dropdown", 403 type: "dropdown",
410 id: "fillMaterial", 404 id: "fillMaterial",
411 prop: "fillMaterial",
412 label: "Fill", 405 label: "Fill",
413 labelField: "_name", 406 labelField: "_name",
414 dataField: "_name", 407 dataField: "_name",
@@ -531,8 +524,7 @@ exports.PiData = Montage.create( Montage, {
531 type: "hottext", 524 type: "hottext",
532 id: "innerRadius", 525 id: "innerRadius",
533 prop: "innerRadius", 526 prop: "innerRadius",
534 label: "Inner R", 527 label: "Inner Radius",
535 valueMutator: parseFloat,
536 value : 0, 528 value : 0,
537 min : 0, 529 min : 0,
538 max : 100, 530 max : 100,
@@ -561,7 +553,6 @@ exports.PiData = Montage.create( Montage, {
561 { 553 {
562 type: "dropdown", 554 type: "dropdown",
563 id: "strokeMaterial", 555 id: "strokeMaterial",
564 prop: "strokeMaterial",
565 label: "Stroke", 556 label: "Stroke",
566 labelField: "_name", 557 labelField: "_name",
567 dataField: "_name", 558 dataField: "_name",
@@ -574,7 +565,6 @@ exports.PiData = Montage.create( Montage, {
574 { 565 {
575 type: "dropdown", 566 type: "dropdown",
576 id: "fillMaterial", 567 id: "fillMaterial",
577 prop: "fillMaterial",
578 label: "Fill", 568 label: "Fill",
579 labelField: "_name", 569 labelField: "_name",
580 dataField: "_name", 570 dataField: "_name",
diff --git a/js/io/system/ninjalibrary.js b/js/io/system/ninjalibrary.js
index 960bdef9..ff949613 100644
--- a/js/io/system/ninjalibrary.js
+++ b/js/io/system/ninjalibrary.js
@@ -116,7 +116,7 @@ exports.NinjaLibrary = Montage.create(Object.prototype, {
116 dir = folder.name; 116 dir = folder.name;
117 } 117 }
118 // 118 //
119 if (!this.coreApi.createDirectory({uri: dir})) { 119 if (!this.coreApi.createDirectory({uri: dir.replace(/\/\//gi, '/')})) {
120 //Error occured while creating folders 120 //Error occured while creating folders
121 return; 121 return;
122 } 122 }
@@ -132,7 +132,7 @@ exports.NinjaLibrary = Montage.create(Object.prototype, {
132 this.chromeApi.fileContent(contents[i].fullPath, function (result) { 132 this.chromeApi.fileContent(contents[i].fullPath, function (result) {
133 // 133 //
134 //this.coreApi.createFile({uri: fileRoot+result.file.fullPath, contents: blob.getBlob(result.data.type), contentType: result.data.type}); 134 //this.coreApi.createFile({uri: fileRoot+result.file.fullPath, contents: blob.getBlob(result.data.type), contentType: result.data.type});
135 this.coreApi.createFile({uri: fileRoot+result.file.fullPath, contents: result.content}); 135 this.coreApi.createFile({uri: (fileRoot+result.file.fullPath).replace(/\/\//gi, '/'), contents: result.content});
136 }.bind(this)); 136 }.bind(this));
137 } 137 }
138 } 138 }
diff --git a/js/panels/Color/colorpanelpopup.reel/colorpanelpopup.js b/js/panels/Color/colorpanelpopup.reel/colorpanelpopup.js
index 299e603d..3eae3ea3 100755
--- a/js/panels/Color/colorpanelpopup.reel/colorpanelpopup.js
+++ b/js/panels/Color/colorpanelpopup.reel/colorpanelpopup.js
@@ -379,11 +379,16 @@ exports.ColorPanelPopup = Montage.create(Component, {
379 gradient.element = container; 379 gradient.element = container;
380 gradient.hack = this.hack; // TODO: Remove 380 gradient.hack = this.hack; // TODO: Remove
381 // 381 //
382 if (g && g.value && g.value.stops && g.value.mode) { 382 if (g && g.value && g.value.stops) {
383 gradient._mode = g.value.mode; 383 if (g.value.gradientMode) {
384 gradient.value = g.value.stops; 384 gradient._mode = g.value.gradientMode;
385 gradient.value = g.value.stops;
386 } else {
387 gradient._mode = 'linear';
388 gradient.value = g.value.stops;
389 }
385 } else { 390 } else {
386 gradient._mode = this.defaultGradient.mode; 391 gradient._mode = this.defaultGradient.gradientMode;
387 gradient.value = this.defaultGradient.stops; 392 gradient.value = this.defaultGradient.stops;
388 } 393 }
389 // 394 //