Autoformatter applied on all js files
This commit is contained in:
1 parent
72c1017b20
commit
c627aedcf6
59 files changed
+9087
-10892
No files matched your search
+480
-537
File diff suppressed because it is too large.
Load diff
+40
-51
@@ -1,67 +1,56 @@
|
||||
function newRigthScale() {
|
||||
function newRigthScale () {
|
||||
let thisObject = {
|
||||
container: undefined,
|
||||
draw: draw,
|
||||
getContainer: getContainer,
|
||||
initialize: initialize
|
||||
}
|
||||
|
||||
let thisObject = {
|
||||
container: undefined,
|
||||
draw: draw,
|
||||
getContainer: getContainer,
|
||||
initialize: initialize
|
||||
};
|
||||
const RIGHT_MARGIN = 50
|
||||
|
||||
const RIGHT_MARGIN = 50;
|
||||
let container = newContainer()
|
||||
container.initialize()
|
||||
thisObject.container = container
|
||||
|
||||
let container = newContainer();
|
||||
container.initialize();
|
||||
thisObject.container = container;
|
||||
thisObject.container.frame.width = RIGHT_MARGIN
|
||||
thisObject.container.frame.height = viewPort.visibleArea.bottomRight.y - viewPort.visibleArea.topRight.y
|
||||
|
||||
thisObject.container.frame.width = RIGHT_MARGIN;
|
||||
thisObject.container.frame.height = viewPort.visibleArea.bottomRight.y - viewPort.visibleArea.topRight.y;
|
||||
container.frame.position.x = viewPort.visibleArea.bottomRight.x
|
||||
container.frame.position.y = TOP_SPACE_HEIGHT
|
||||
|
||||
container.frame.position.x = viewPort.visibleArea.bottomRight.x;
|
||||
container.frame.position.y = TOP_SPACE_HEIGHT;
|
||||
container.isDraggeable = false
|
||||
container.isClickeable = false
|
||||
container.isWheeleable = true
|
||||
|
||||
container.isDraggeable = false;
|
||||
container.isClickeable = false;
|
||||
container.isWheeleable = true;
|
||||
return thisObject
|
||||
|
||||
return thisObject;
|
||||
function initialize () {
|
||||
thisObject.container.eventHandler.listenToEvent('Mouse Wheel', onMouseWheel)
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
function onMouseWheel (pDelta) {
|
||||
if (pDelta < 0) {
|
||||
pDelta = -0.1
|
||||
} else {
|
||||
pDelta = 0.1
|
||||
}
|
||||
}
|
||||
|
||||
thisObject.container.eventHandler.listenToEvent('Mouse Wheel', onMouseWheel);
|
||||
|
||||
}
|
||||
|
||||
function onMouseWheel(pDelta) {
|
||||
|
||||
if (pDelta < 0) {
|
||||
pDelta = -0.1;
|
||||
} else {
|
||||
pDelta = 0.1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function getContainer(point) {
|
||||
|
||||
let container;
|
||||
function getContainer (point) {
|
||||
let container
|
||||
|
||||
/* First we check if this point is inside this object UI. */
|
||||
|
||||
if (thisObject.container.frame.isThisPointHere(point, true) === true) {
|
||||
|
||||
return this.container;
|
||||
|
||||
} else {
|
||||
|
||||
if (thisObject.container.frame.isThisPointHere(point, true) === true) {
|
||||
return this.container
|
||||
} else {
|
||||
/* This point does not belong to this space. */
|
||||
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
function draw() {
|
||||
function draw () {
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user