From a122c8137152cb7d6c1a398033364b200330b6ee Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 17 Nov 2014 11:34:28 -0500 Subject: autosave after tweaking wallpaper size --- public/assets/javascripts/ui/editor/WallpaperPicker.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'public/assets/javascripts') diff --git a/public/assets/javascripts/ui/editor/WallpaperPicker.js b/public/assets/javascripts/ui/editor/WallpaperPicker.js index c383489..e2aaeb7 100644 --- a/public/assets/javascripts/ui/editor/WallpaperPicker.js +++ b/public/assets/javascripts/ui/editor/WallpaperPicker.js @@ -186,10 +186,19 @@ var WallpaperPicker = UploadView.extend({ this.$scale.val( Math.log( this.wall.background.scale ) ) }, + scaleTimeout: null, updateScale: function(){ if (! this.wall) return; var scale = Math.exp( parseFloat(this.$scale.val()) ) this.wall.wallpaperPosition({ scale: scale }) + + clearTimeout(this.scaleTimeout) + this.scaleTimeout = setTimeout(function(){ + + // TODO: watch individual scenery object here + Minotaur.watch( app.router.editorView.settings ) + + }.bind(this), 500) }, enterUrl: function(){ -- cgit v1.2.3-70-g09d2