aboutsummaryrefslogtreecommitdiff
path: root/js/data
diff options
context:
space:
mode:
authorValerio Virgillito2012-02-08 10:18:36 -0800
committerValerio Virgillito2012-02-08 10:18:36 -0800
commit763910b9d074137eb7dee80447b89407ce5750c9 (patch)
tree3c8820a06afd442fa5ba8e68665a4d2836230628 /js/data
parente5579374ff39b80b8c0c69faba37f6f581758fe0 (diff)
parent329a859e2666716c3a1d99c6bd2679e10c81fc8d (diff)
downloadninja-763910b9d074137eb7dee80447b89407ce5750c9.tar.gz
Merge pull request #20 from mqg734/ToolFixes
Hooked up materials code to go through the ShapesController and updated the PI to reflect the currently selected shape's materials. Also fixed the following bugs:
Diffstat (limited to 'js/data')
-rw-r--r--js/data/pi/pi-data.js48
1 files changed, 44 insertions, 4 deletions
diff --git a/js/data/pi/pi-data.js b/js/data/pi/pi-data.js
index dd75e255..10b33a0e 100644
--- a/js/data/pi/pi-data.js
+++ b/js/data/pi/pi-data.js
@@ -369,12 +369,24 @@ exports.PiData = Montage.create( Montage, {
369 Section: [ 369 Section: [
370 [ 370 [
371 { 371 {
372 type: "checkbox",
373 id: "useWebGl",
374 prop: "useWebGl",
375 defaultValue: false,
376 value: "Use WebGL",
377 checked: false
378 }
379 ],
380 [
381 {
372 type: "dropdown", 382 type: "dropdown",
373 id: "strokeMaterial", 383 id: "strokeMaterial",
374 prop: "strokeMaterial", 384 prop: "strokeMaterial",
375 label: "Stroke", 385 label: "Stroke",
376 labelField: "_name", 386 labelField: "_name",
387 dataField: "_name",
377 items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, 388 items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" },
389 enabled: { boundObject: "this.controls", boundProperty: "useWebGl" },
378 divider : true 390 divider : true
379 } 391 }
380 ], 392 ],
@@ -385,7 +397,9 @@ exports.PiData = Montage.create( Montage, {
385 prop: "fillMaterial", 397 prop: "fillMaterial",
386 label: "Fill", 398 label: "Fill",
387 labelField: "_name", 399 labelField: "_name",
388 items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" } 400 dataField: "_name",
401 items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" },
402 enabled: { boundObject: "this.controls", boundProperty: "useWebGl" }
389 } 403 }
390 ] 404 ]
391 ] 405 ]
@@ -434,11 +448,23 @@ exports.PiData = Montage.create( Montage, {
434 Section: [ 448 Section: [
435 [ 449 [
436 { 450 {
451 type: "checkbox",
452 id: "useWebGl",
453 prop: "useWebGl",
454 defaultValue: false,
455 value: "Use WebGL",
456 checked: false
457 }
458 ],
459 [
460 {
437 type: "dropdown", 461 type: "dropdown",
438 id: "stroke", 462 id: "stroke",
439 label: "Stroke", 463 label: "Stroke",
440 labelField: "_name", 464 labelField: "_name",
441 items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" } 465 dataField: "_name",
466 items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" },
467 enabled: { boundObject: "this.controls", boundProperty: "useWebGl" }
442 } 468 }
443 ] 469 ]
444 ] 470 ]
@@ -507,12 +533,24 @@ exports.PiData = Montage.create( Montage, {
507 Section: [ 533 Section: [
508 [ 534 [
509 { 535 {
536 type: "checkbox",
537 id: "useWebGl",
538 prop: "useWebGl",
539 defaultValue: false,
540 value: "Use WebGL",
541 checked: false
542 }
543 ],
544 [
545 {
510 type: "dropdown", 546 type: "dropdown",
511 id: "strokeMaterial", 547 id: "strokeMaterial",
512 prop: "strokeMaterial", 548 prop: "strokeMaterial",
513 label: "Stroke", 549 label: "Stroke",
514 labelFunction: function(item) { return item.getName(); }, 550 labelField: "_name",
551 dataField: "_name",
515 items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, 552 items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" },
553 enabled: { boundObject: "this.controls", boundProperty: "useWebGl" },
516 divider : true 554 divider : true
517 } 555 }
518 ], 556 ],
@@ -523,7 +561,9 @@ exports.PiData = Montage.create( Montage, {
523 prop: "fillMaterial", 561 prop: "fillMaterial",
524 label: "Fill", 562 label: "Fill",
525 labelField: "_name", 563 labelField: "_name",
526 items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" } 564 dataField: "_name",
565 items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" },
566 enabled: { boundObject: "this.controls", boundProperty: "useWebGl" }
527 } 567 }
528 ] 568 ]
529 ] 569 ]