This commit is contained in:
Luis Fernando Molina committed 2020-01-17 18:13:10 +01:00
1 parent ce5d77e643
commit d370306e23
1 file changed
+14 -10
+14 -10
View File
@@ -31,6 +31,7 @@ function newViewPort () {
zoomLevel: undefined,
mousePosition: undefined,
margins: MARGINS,
payload: undefined,
newZoomLevel: newZoomLevel,
applyZoom: applyZoom,
isMinZoom: isMinZoom,
@@ -45,37 +46,37 @@ function newViewPort () {
draw: draw,
raiseEvents: raiseEvents,
resize: resize,
initialize: initialize
initialize: initialize,
finalize: finalize
}
let increment = 0.035
let position = {
x: 0,
y: 0
}
let targetPosition = {
x: 0,
y: 0
}
let positionIncrement = {
x: 0,
y: 0
}
thisObject.mousePosition = {
x: 0,
y: 0
}
thisObject.eventHandler = newEventHandler()
let objectStorage = {}
return thisObject
function finalize () {
logger = undefined
thisObject.eventHandler.finalize()
thisObject.payload = undefined
thisObject = undefined
}
function initialize () {
resize()
readObjectState()
@@ -435,6 +436,10 @@ function newViewPort () {
objectStorage.position = position
objectStorage.zoomLevel = thisObject.zoomLevel
window.localStorage.setItem(MODULE_NAME, JSON.stringify(objectStorage))
let frame = {}
frame.position = position
saveFrame(thisObject.payload, frame)
}
function readObjectState () {
@@ -455,4 +460,3 @@ function newViewPort () {
}
}
}