UI should use $.get/$.set instead of localStorage.
This commit is contained in:
parent
344e1aaa19
commit
06d77102a4
@ -4,7 +4,8 @@ UI = do ->
|
|||||||
className: 'dialog'
|
className: 'dialog'
|
||||||
innerHTML: html
|
innerHTML: html
|
||||||
id: id
|
id: id
|
||||||
el.style.cssText = localStorage.getItem("#{g.NAMESPACE}#{id}.position") or position
|
$.get "#{id}.position", position, (item) ->
|
||||||
|
el.style.cssText = item["#{id}.position"]
|
||||||
move = $ '.move', el
|
move = $ '.move', el
|
||||||
$.on move, 'touchstart mousedown', dragstart
|
$.on move, 'touchstart mousedown', dragstart
|
||||||
el
|
el
|
||||||
@ -273,7 +274,7 @@ UI = do ->
|
|||||||
else # mouseup
|
else # mouseup
|
||||||
$.off d, 'mousemove', @move
|
$.off d, 'mousemove', @move
|
||||||
$.off d, 'mouseup', @up
|
$.off d, 'mouseup', @up
|
||||||
localStorage.setItem "#{g.NAMESPACE}#{@id}.position", @style.cssText
|
$.set "#{@id}.position", @style.cssText
|
||||||
|
|
||||||
hoverstart = ({root, el, latestEvent, endEvents, asapTest, cb}) ->
|
hoverstart = ({root, el, latestEvent, endEvents, asapTest, cb}) ->
|
||||||
o = {
|
o = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user