summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/ui/editor
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-04-20 13:15:19 -0400
committerJules Laplace <jules@okfoc.us>2015-04-20 13:15:19 -0400
commit24543d0839ad51b2afa7195b16d29bc52b3f1a1b (patch)
treee8fd5e8054835ce02ef33071416c18d24f9ffdfd /public/assets/javascripts/ui/editor
parentf68450b1c3ece018009df5542b7e73b2b74852e7 (diff)
remove sculpture
Diffstat (limited to 'public/assets/javascripts/ui/editor')
-rw-r--r--public/assets/javascripts/ui/editor/SculptureEditor.js31
1 files changed, 30 insertions, 1 deletions
diff --git a/public/assets/javascripts/ui/editor/SculptureEditor.js b/public/assets/javascripts/ui/editor/SculptureEditor.js
index cce000e..ab0ccd2 100644
--- a/public/assets/javascripts/ui/editor/SculptureEditor.js
+++ b/public/assets/javascripts/ui/editor/SculptureEditor.js
@@ -10,12 +10,15 @@ var SculptureEditor = FormView.extend({
"mousedown": "stopPropagation",
"change [name=keyframe]": "seek",
"change [name=autoplay]": "setAutoplay",
+ "change [name=billboard]": "setBillboard",
+ "change [name=outline]": "setOutline",
+ "change [name=outlineColor]": "setOutlineColor",
"change [name=loop]": "setLoop",
"change [name=mute]": "setMute",
"change [name=width]": 'changeWidth',
"change [name=height]": 'changeHeight',
"change [name=units]": 'changeUnits',
- "click [data-role=destroy-media]": "destroy",
+ "click [data-role=destroy-sculpture]": "destroy",
},
initialize: function(opt){
@@ -25,6 +28,10 @@ var SculptureEditor = FormView.extend({
this.$name = this.$("[name=name]")
this.$description = this.$("[name=description]")
+ this.$billboard = this.$("[name=billboard]")
+ this.$outline = this.$("[name=outline]")
+ this.$outlineColor = this.$("[name=outlineColor]")
+
// image fields
this.$width = this.$("[name=width]")
this.$height = this.$("[name=height]")
@@ -71,6 +78,11 @@ var SculptureEditor = FormView.extend({
this.$description.val(media.description)
this.setDimensions()
this.$units.val( "ft" )
+
+ this.$outline.prop( 'checked', !! media.outline )
+ this.$outlineColor.val( media.outlineColor )
+ this.$billboard.prop( 'checked', !! media.billboard )
+
switch (media.type) {
case "image":
@@ -138,6 +150,23 @@ var SculptureEditor = FormView.extend({
this.tainted = true
},
+
+ setBillboard: function(){
+ var checked = this.$billboard.prop('checked')
+ this.sculpture.setBillboard(checked)
+ this.tainted = true
+ },
+ setOutline: function(){
+ var checked = this.$outline.prop('checked')
+ this.sculpture.setOutline(checked)
+ this.tainted = true
+ },
+ setOutlineColor: function(){
+ var color = this.$outlineColor.val()
+ this.sculpture.setOutlineColor(color)
+ this.tainted = true
+ },
+
setDimensions: function(){
if (! this.sculpture) return
this.$width.unitVal( Number(this.sculpture.naturalDimensions.a * this.sculpture.scale) || "" )