diff options
Diffstat (limited to 'public/assets/javascripts/ui/blueprint/BlueprintSettings.js')
| -rw-r--r-- | public/assets/javascripts/ui/blueprint/BlueprintSettings.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/public/assets/javascripts/ui/blueprint/BlueprintSettings.js b/public/assets/javascripts/ui/blueprint/BlueprintSettings.js index f9c9e78..acd8dcc 100644 --- a/public/assets/javascripts/ui/blueprint/BlueprintSettings.js +++ b/public/assets/javascripts/ui/blueprint/BlueprintSettings.js @@ -26,6 +26,10 @@ var BlueprintSettings = FormView.extend({ load: function(data){ this.$id.val(data._id) this.$name.val(data.name) + if (data.shapes) { + shapes.destroy() + shapes.deserialize( data.shapes ) + } this.data = data }, @@ -88,7 +92,6 @@ var BlueprintSettings = FormView.extend({ fd.append( "name", this.$name.val() ) fd.append( "shapes", JSON.stringify( shapes.serialize() ) ) fd.append( "startPosition", JSON.stringify( app.position(scene.camera) ) ) - fd.append( "thumbnail", this.data.url ) return fd }, @@ -105,7 +108,7 @@ var BlueprintSettings = FormView.extend({ Minotaur.unwatch(this) Minotaur.hide() - window.history.pushState(null, document.title, "/layout/" + data.slug) + window.history.pushState(null, document.title, "/blueprint/" + data.slug) }, }) |
