diff options
| author | ryderr <r@okfoc.us> | 2014-10-16 15:28:42 -0400 |
|---|---|---|
| committer | ryderr <r@okfoc.us> | 2014-10-16 15:28:42 -0400 |
| commit | e25af0a7106c359faae2f73a7c2295ea93db8341 (patch) | |
| tree | e9ac0bc6690feb702dd5802a95f51481f7b3c878 /public/assets/javascripts/ui/editor/HelpCursor.js | |
| parent | a49396746de264667784f52b3f02c0089cd6fd5e (diff) | |
| parent | f8a4bb4609511393c92c618962f990673328d2f0 (diff) | |
Merge branch 'master' of github.com:okfocus/vvalls
Diffstat (limited to 'public/assets/javascripts/ui/editor/HelpCursor.js')
| -rw-r--r-- | public/assets/javascripts/ui/editor/HelpCursor.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/public/assets/javascripts/ui/editor/HelpCursor.js b/public/assets/javascripts/ui/editor/HelpCursor.js index 3bcfd7a..d0e1825 100644 --- a/public/assets/javascripts/ui/editor/HelpCursor.js +++ b/public/assets/javascripts/ui/editor/HelpCursor.js @@ -43,9 +43,12 @@ var HelpCursor = View.extend({ document.removeEventListener("mousemove", this.moveFn) }, + offset: 100, + lastPosition: { pageX: 0, pageY: 0 }, move: function(e){ - this.el.style.left = e.pageX + "px" + this.el.style.right = clamp(window.innerWidth - e.pageX, this.offset, window.innerWidth) + "px" this.el.style.top = e.pageY + "px" + this.lastPosition = e }, show: function(name){ @@ -54,6 +57,16 @@ var HelpCursor = View.extend({ message: function(name){ if (! this.active) return + if (name == "start" || name == "media" || name == "settings") { + this.offset = 100 + } + else if (name == "colors") { + this.offset = 270 + } + else { + this.offset = 290 + } + this.move(this.lastPosition) this.$el.html(this.messages[name]) }, |
