Freeze Icon at all menues

This commit is contained in:
Luis Fernando Molina committed 2019-05-28 19:39:47 +02:00
1 parent 890732954e
commit ac8d5a9576
2 files changed
+268

No files matched your search

+16
View File
@@ -21,10 +21,13 @@ function newFloatingObject () {
rawRadius: 0, // This is the radius of this floating object without zoom.
targetRadius: 0, // This is the target radius of the floating object with zoom applied. It should be animated until reaching this value.
isPinned: false,
isFrozen: false,
getPinStatus: getPinStatus,
getFreezeStatus: getFreezeStatus,
nearbyFloatingObjects: [],
setPosition: setPosition,
pinToggle: pinToggle,
freezeToggle: freezeToggle,
physics: physics,
initializeMass: initializeMass,
initializeRadius: initializeRadius,
@@ -116,6 +119,19 @@ function newFloatingObject () {
return thisObject.isPinned
}
function getFreezeStatus () {
return thisObject.isFrozen
}
function freezeToggle () {
if (thisObject.isFrozen !== true) {
thisObject.isFrozen = true
} else {
thisObject.isFrozen = false
}
return thisObject.isFrozen
}
function physics () {
thisObjectPhysics()
thisObject.payload.uiObject.physics()