Zoom Module DEPRECATED
This commit is contained in:
1 parent
cb7b068f37
commit
e41e069caf
22 files changed
+6
-133
No files matched your search
Binary file not shown.
@@ -56,7 +56,6 @@ function newBall() {
|
||||
|
||||
targetPosition = this.container.frame.frameThisPoint(targetPosition);
|
||||
targetPosition = this.container.displacement.displaceThisPoint(targetPosition);
|
||||
targetPosition = this.container.zoom.zoomThisPoint(targetPosition);
|
||||
|
||||
this.targetPosition = targetPosition;
|
||||
|
||||
@@ -127,14 +126,13 @@ function newBall() {
|
||||
|
||||
function updateMass() {
|
||||
|
||||
this.currentMass = this.rawMass + this.rawMass * this.container.zoom.incrementM * this.container.zoom.levelM;
|
||||
//this.currentMass = this.rawMass + this.rawMass * this.container.zoom.incrementM * this.container.zoom.levelM;
|
||||
|
||||
}
|
||||
|
||||
function updateRadius() {
|
||||
|
||||
|
||||
this.targetRadius = this.rawRadius + this.rawRadius * this.container.zoom.incrementR * this.container.zoom.levelR;
|
||||
//this.targetRadius = this.rawRadius + this.rawRadius * this.container.zoom.incrementR * this.container.zoom.levelR;
|
||||
|
||||
}
|
||||
|
||||
@@ -153,10 +151,6 @@ function newBall() {
|
||||
|
||||
point = this.container.displacement.displaceThisPoint(point);
|
||||
|
||||
/* Third we apply the zoom factor. */
|
||||
|
||||
point = this.container.zoom.zoomThisPoint(point);
|
||||
|
||||
this.targetPosition.x = point.x;
|
||||
this.targetPosition.y = point.y;
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
var container = newContainer();
|
||||
container.initialize();
|
||||
container.isDraggeable = false;
|
||||
container.isZoomeable = false;
|
||||
container.isClickeable = true;
|
||||
button.container = container;
|
||||
|
||||
@@ -170,15 +169,6 @@
|
||||
point6 = button.container.displacement.displaceThisPoint(point6);
|
||||
point7 = button.container.displacement.displaceThisPoint(point7);
|
||||
|
||||
point1 = button.container.zoom.zoomThisPoint(point1);
|
||||
point2 = button.container.zoom.zoomThisPoint(point2);
|
||||
point3 = button.container.zoom.zoomThisPoint(point3);
|
||||
|
||||
point5 = button.container.zoom.zoomThisPoint(point5);
|
||||
point6 = button.container.zoom.zoomThisPoint(point6);
|
||||
point7 = button.container.zoom.zoomThisPoint(point7);
|
||||
|
||||
|
||||
/* Lets start the drawing. */
|
||||
|
||||
browserCanvasContext.beginPath();
|
||||
@@ -236,10 +226,6 @@
|
||||
point2 = button.container.displacement.displaceThisPoint(point2);
|
||||
point3 = button.container.displacement.displaceThisPoint(point3);
|
||||
|
||||
point1 = button.container.zoom.zoomThisPoint(point1);
|
||||
point2 = button.container.zoom.zoomThisPoint(point2);
|
||||
point3 = button.container.zoom.zoomThisPoint(point3);
|
||||
|
||||
/* Lets start the drawing. */
|
||||
|
||||
browserCanvasContext.beginPath();
|
||||
@@ -326,16 +312,6 @@
|
||||
point7 = button.container.displacement.displaceThisPoint(point7);
|
||||
point8 = button.container.displacement.displaceThisPoint(point8);
|
||||
|
||||
point1 = button.container.zoom.zoomThisPoint(point1);
|
||||
point2 = button.container.zoom.zoomThisPoint(point2);
|
||||
point3 = button.container.zoom.zoomThisPoint(point3);
|
||||
|
||||
point5 = button.container.zoom.zoomThisPoint(point5);
|
||||
point6 = button.container.zoom.zoomThisPoint(point6);
|
||||
point7 = button.container.zoom.zoomThisPoint(point7);
|
||||
point8 = button.container.zoom.zoomThisPoint(point8);
|
||||
|
||||
|
||||
/* Lets start the drawing. */
|
||||
|
||||
browserCanvasContext.beginPath();
|
||||
@@ -429,16 +405,6 @@
|
||||
point7 = button.container.displacement.displaceThisPoint(point7);
|
||||
point8 = button.container.displacement.displaceThisPoint(point8);
|
||||
|
||||
point1 = button.container.zoom.zoomThisPoint(point1);
|
||||
point2 = button.container.zoom.zoomThisPoint(point2);
|
||||
point3 = button.container.zoom.zoomThisPoint(point3);
|
||||
point4 = button.container.zoom.zoomThisPoint(point4);
|
||||
point5 = button.container.zoom.zoomThisPoint(point5);
|
||||
point6 = button.container.zoom.zoomThisPoint(point6);
|
||||
point7 = button.container.zoom.zoomThisPoint(point7);
|
||||
point8 = button.container.zoom.zoomThisPoint(point8);
|
||||
|
||||
|
||||
/* Lets start the drawing. */
|
||||
|
||||
browserCanvasContext.beginPath();
|
||||
@@ -531,16 +497,6 @@
|
||||
point7 = button.container.displacement.displaceThisPoint(point7);
|
||||
point8 = button.container.displacement.displaceThisPoint(point8);
|
||||
|
||||
point1 = button.container.zoom.zoomThisPoint(point1);
|
||||
point2 = button.container.zoom.zoomThisPoint(point2);
|
||||
point3 = button.container.zoom.zoomThisPoint(point3);
|
||||
|
||||
point5 = button.container.zoom.zoomThisPoint(point5);
|
||||
point6 = button.container.zoom.zoomThisPoint(point6);
|
||||
point7 = button.container.zoom.zoomThisPoint(point7);
|
||||
point8 = button.container.zoom.zoomThisPoint(point8);
|
||||
|
||||
|
||||
/* Lets start the drawing. */
|
||||
|
||||
browserCanvasContext.beginPath();
|
||||
@@ -600,10 +556,6 @@
|
||||
point2 = button.container.displacement.displaceThisPoint(point2);
|
||||
point3 = button.container.displacement.displaceThisPoint(point3);
|
||||
|
||||
point1 = button.container.zoom.zoomThisPoint(point1);
|
||||
point2 = button.container.zoom.zoomThisPoint(point2);
|
||||
point3 = button.container.zoom.zoomThisPoint(point3);
|
||||
|
||||
/* Lets start the drawing. */
|
||||
|
||||
browserCanvasContext.beginPath();
|
||||
@@ -686,15 +638,6 @@
|
||||
point6 = button.container.displacement.displaceThisPoint(point6);
|
||||
point7 = button.container.displacement.displaceThisPoint(point7);
|
||||
|
||||
point1 = button.container.zoom.zoomThisPoint(point1);
|
||||
point2 = button.container.zoom.zoomThisPoint(point2);
|
||||
point3 = button.container.zoom.zoomThisPoint(point3);
|
||||
|
||||
point5 = button.container.zoom.zoomThisPoint(point5);
|
||||
point6 = button.container.zoom.zoomThisPoint(point6);
|
||||
point7 = button.container.zoom.zoomThisPoint(point7);
|
||||
|
||||
|
||||
/* Lets start the drawing. */
|
||||
|
||||
browserCanvasContext.beginPath();
|
||||
|
||||
@@ -296,7 +296,7 @@ function newCanvas() {
|
||||
mZoomValue = -1;
|
||||
}
|
||||
|
||||
ball.container.zoom.mZoom(mZoomValue); // Zoom is applied to ball mass of all balls in the same container.
|
||||
//ball.container.zoom.mZoom(mZoomValue); // Zoom is applied to ball mass of all balls in the same container.
|
||||
}
|
||||
|
||||
if (containerDragStarted || viewPortBeingDragged) {
|
||||
@@ -390,7 +390,7 @@ function newCanvas() {
|
||||
|
||||
/* We need to apply the Radius zoom to the cointainer of the ball where the zoom was made, for that reason, we need the ball. */
|
||||
|
||||
balls[ballIndex].container.zoom.rZoom(delta); // Zoom is applied to ball radius.
|
||||
// balls[ballIndex].container.zoom.rZoom(delta); // Zoom is applied to ball radius.
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
@@ -25,13 +25,11 @@ function newChartSpace() {
|
||||
chartSpace.container.frame.height = browserCanvas.height * 100;
|
||||
|
||||
container.displacement.containerName = "Chart Space";
|
||||
container.zoom.containerName = "Chart Space";
|
||||
container.frame.containerName = "Chart Space";
|
||||
|
||||
container.frame.position.x = browserCanvas.width / 2 - chartSpace.container.frame.width / 2;
|
||||
container.frame.position.y = browserCanvas.height / 2 - chartSpace.container.frame.height / 2;
|
||||
|
||||
container.isZoomeable = false;
|
||||
container.isDraggeable = false;
|
||||
|
||||
return chartSpace;
|
||||
@@ -44,7 +42,6 @@ function newChartSpace() {
|
||||
var timeMachine = newTimeMachine();
|
||||
|
||||
timeMachine.container.displacement.parentDisplacement = this.container.displacement;
|
||||
timeMachine.container.zoom.parentZoom = this.container.zoom;
|
||||
timeMachine.container.frame.parentFrame = this.container.frame;
|
||||
|
||||
timeMachine.container.parentContainer = this.container;
|
||||
|
||||
@@ -5,11 +5,9 @@ function newContainer() {
|
||||
var container = {
|
||||
frame: undefined,
|
||||
displacement: undefined,
|
||||
zoom: undefined,
|
||||
eventHandler: undefined,
|
||||
parentContainer: undefined,
|
||||
isDraggeable: true,
|
||||
isZoomeable: true,
|
||||
isClickeable: false,
|
||||
name: undefined,
|
||||
initialize: initialize
|
||||
@@ -33,11 +31,5 @@ function newContainer() {
|
||||
this.displacement = displacement;
|
||||
displacement.container = container;
|
||||
|
||||
var zoom = newZoom();
|
||||
this.zoom = zoom;
|
||||
zoom.container = container;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -175,13 +175,6 @@ function newFrame() {
|
||||
point3 = this.container.displacement.displaceThisPoint(point3);
|
||||
point4 = this.container.displacement.displaceThisPoint(point4);
|
||||
|
||||
/* We add the actual zoom. */
|
||||
|
||||
point1 = this.container.zoom.zoomThisPoint(point1);
|
||||
point2 = this.container.zoom.zoomThisPoint(point2);
|
||||
point3 = this.container.zoom.zoomThisPoint(point3);
|
||||
point4 = this.container.zoom.zoomThisPoint(point4);
|
||||
|
||||
if (this.parentFrame.isThisPointHere(point1) === false) {
|
||||
return false;
|
||||
}
|
||||
@@ -284,7 +277,6 @@ function newFrame() {
|
||||
|
||||
if (outsideViewPort === true) {
|
||||
|
||||
checkPoint = this.container.zoom.unzoomThisPoint(checkPoint);
|
||||
checkPoint = this.container.displacement.undisplaceThisPoint(checkPoint);
|
||||
checkPoint = this.container.frame.unframeThisPoint(checkPoint);
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
var container = newContainer();
|
||||
container.initialize();
|
||||
container.isDraggeable = false;
|
||||
container.isZoomeable = false;
|
||||
container.isClickeable = true;
|
||||
thisObject.container = container;
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ function newOrderBookChart() {
|
||||
orderBookChart.container = container;
|
||||
|
||||
container.displacement.containerName = "Order Book Chart";
|
||||
container.zoom.containerName = "Order Book Chart";
|
||||
container.frame.containerName = "Order Book Chart";
|
||||
|
||||
var orderBookDephChart = newOrderBookDephChart();
|
||||
@@ -51,7 +50,6 @@ function newOrderBookChart() {
|
||||
orderBookDephChart.container.frame.position.y = this.container.frame.height * 0.05;
|
||||
|
||||
orderBookDephChart.container.displacement.parentDisplacement = this.container.displacement;
|
||||
orderBookDephChart.container.zoom.parentZoom = this.container.zoom;
|
||||
orderBookDephChart.container.frame.parentFrame = this.container.frame;
|
||||
|
||||
orderBookDephChart.container.parentContainer = this.container;
|
||||
|
||||
@@ -26,7 +26,6 @@ function newOrderBookDephChart() {
|
||||
orderBookDephChart.container = container;
|
||||
|
||||
container.displacement.containerName = "Order Book Depth Chart";
|
||||
container.zoom.containerName = "Order Book Depth Chart";
|
||||
container.frame.containerName = "Order Book Depth Chart";
|
||||
|
||||
var bidPoints = [];
|
||||
@@ -339,7 +338,6 @@ function newOrderBookDephChart() {
|
||||
|
||||
point = orderBookDephChart.container.frame.frameThisPoint(point);
|
||||
point = orderBookDephChart.container.displacement.displaceThisPoint(point);
|
||||
point = orderBookDephChart.container.zoom.zoomThisPoint(point);
|
||||
|
||||
browserCanvasContext.fillText(label, point.x, point.y);
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ function newControlPanel() {
|
||||
var container = newContainer();
|
||||
container.initialize();
|
||||
container.isDraggeable = true;
|
||||
container.isZoomeable = false;
|
||||
controlPanel.container = container;
|
||||
controlPanel.container.frame.containerName = "Time Control Panel";
|
||||
|
||||
@@ -56,7 +55,6 @@ function newControlPanel() {
|
||||
button.type = buttonNames[i];
|
||||
|
||||
button.container.displacement.parentDisplacement = this.container.displacement;
|
||||
button.container.zoom.parentZoom = this.container.zoom;
|
||||
button.container.frame.parentFrame = this.container.frame;
|
||||
|
||||
button.container.parentContainer = this.container;
|
||||
|
||||
@@ -14,7 +14,6 @@ function newOrderBookPanel() {
|
||||
orderBookPanel.container = container;
|
||||
|
||||
container.displacement.containerName = "Order Book Panel";
|
||||
container.zoom.containerName = "Order Book Panel";
|
||||
container.frame.containerName = "Order Book Panel";
|
||||
|
||||
let currentOrderBook;
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
container.initialize();
|
||||
|
||||
container.isDraggeable = true;
|
||||
container.isZoomeable = false;
|
||||
|
||||
thisObject.container = container;
|
||||
thisObject.container.frame.containerName = "Bot's Products";
|
||||
@@ -76,7 +75,6 @@
|
||||
/* Container Stuff */
|
||||
|
||||
productCard.container.displacement.parentDisplacement = thisObject.container.displacement;
|
||||
productCard.container.zoom.parentZoom = thisObject.container.zoom;
|
||||
productCard.container.frame.parentFrame = thisObject.container.frame;
|
||||
productCard.container.parentContainer = thisObject.container;
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ function newPriceChart() {
|
||||
priceChart.container = container;
|
||||
|
||||
container.displacement.containerName = "Price Chart";
|
||||
container.zoom.containerName = "Price Chart";
|
||||
container.frame.containerName = "Price Chart";
|
||||
|
||||
var marketId;
|
||||
|
||||
@@ -67,7 +67,6 @@
|
||||
container.name = "Product Card " + thisObject.code;
|
||||
container.initialize();
|
||||
container.isDraggeable = false;
|
||||
container.isZoomeable = false;
|
||||
container.isClickeable = true;
|
||||
thisObject.container = container;
|
||||
|
||||
|
||||
@@ -23,13 +23,11 @@ function newSplashScreen() {
|
||||
splashScreen.container.frame.height = browserCanvas.height;
|
||||
|
||||
container.displacement.containerName = "Splash Screen";
|
||||
container.zoom.containerName = "Splash Screen";
|
||||
container.frame.containerName = "Splash Screen";
|
||||
|
||||
container.frame.position.x = 0;
|
||||
container.frame.position.y = 0;
|
||||
|
||||
container.isZoomeable = false;
|
||||
container.isDraggeable = false;
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@ function newSpreadChart() {
|
||||
spreadChart.container = container;
|
||||
|
||||
container.displacement.containerName = "Spread Chart";
|
||||
container.zoom.containerName = "Spread Chart";
|
||||
container.frame.containerName = "Spread Chart";
|
||||
|
||||
var marketId;
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
var container = newContainer();
|
||||
container.initialize();
|
||||
container.isDraggeable = false;
|
||||
container.isZoomeable = false;
|
||||
container.isClickeable = true;
|
||||
textButton.container = container;
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ function newTimeMachine() {
|
||||
timeMachine.container.isDraggeable = false;
|
||||
|
||||
container.displacement.containerName = "Time Machine";
|
||||
container.zoom.containerName = "Time Machine";
|
||||
container.frame.containerName = "Time Machine";
|
||||
|
||||
let botsPanel;
|
||||
@@ -44,7 +43,6 @@ function newTimeMachine() {
|
||||
let timelineChart = newTimelineChart();
|
||||
|
||||
timelineChart.container.displacement.parentDisplacement = timeMachine.container.displacement;
|
||||
timelineChart.container.zoom.parentZoom = timeMachine.container.zoom;
|
||||
timelineChart.container.frame.parentFrame = timeMachine.container.frame;
|
||||
|
||||
timelineChart.container.parentContainer = timeMachine.container;
|
||||
@@ -85,7 +83,6 @@ function newTimeMachine() {
|
||||
let timelineChart = newTimelineChart();
|
||||
|
||||
timelineChart.container.displacement.parentDisplacement = timeMachine.container.displacement;
|
||||
timelineChart.container.zoom.parentZoom = timeMachine.container.zoom;
|
||||
timelineChart.container.frame.parentFrame = timeMachine.container.frame;
|
||||
|
||||
timelineChart.container.parentContainer = timeMachine.container;
|
||||
|
||||
@@ -24,7 +24,6 @@ function newTimelineChart() {
|
||||
thisObject.container = container;
|
||||
|
||||
container.displacement.containerName = "Time Period Chart";
|
||||
container.zoom.containerName = "Time Period Chart";
|
||||
container.frame.containerName = "Time Period Chart";
|
||||
|
||||
let marketId;
|
||||
@@ -97,7 +96,6 @@ function newTimelineChart() {
|
||||
let plotter = getNewPlotter(competition.plotter.host, competition.plotter.codeName, competition.plotter.moduleName);
|
||||
|
||||
plotter.container.displacement.parentDisplacement = thisObject.container.displacement;
|
||||
plotter.container.zoom.parentZoom = thisObject.container.zoom;
|
||||
plotter.container.frame.parentFrame = thisObject.container.frame;
|
||||
|
||||
plotter.container.parentContainer = thisObject.container;
|
||||
@@ -191,7 +189,6 @@ function newTimelineChart() {
|
||||
let plotter = getNewPlotter(pProductCard.product.plotter.devTeam, pProductCard.product.plotter.codeName, pProductCard.product.plotter.moduleName);
|
||||
|
||||
plotter.container.displacement.parentDisplacement = thisObject.container.displacement;
|
||||
plotter.container.zoom.parentZoom = thisObject.container.zoom;
|
||||
plotter.container.frame.parentFrame = thisObject.container.frame;
|
||||
|
||||
plotter.container.parentContainer = thisObject.container;
|
||||
|
||||
@@ -10,10 +10,6 @@ function transformThisPoint(point, container) {
|
||||
|
||||
point = container.displacement.displaceThisPoint(point);
|
||||
|
||||
/* We apply the zoom factor. */
|
||||
|
||||
//point = container.zoom.zoomThisPoint(point);
|
||||
|
||||
/* We viewport Transformation. */
|
||||
|
||||
point = viewPort.zoomThisPoint(point);
|
||||
@@ -24,7 +20,6 @@ function transformThisPoint(point, container) {
|
||||
function unTransformThisPoint(point, container) {
|
||||
|
||||
point = viewPort.unzoomThisPoint(point);
|
||||
point = container.zoom.unzoomThisPoint(point);
|
||||
point = container.displacement.undisplaceThisPoint(point);
|
||||
point = container.frame.unframeThisPoint(point);
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ function newOrderBookChart() {
|
||||
orderBookChart.container = container;
|
||||
|
||||
container.displacement.containerName = "Order Book Chart";
|
||||
container.zoom.containerName = "Order Book Chart";
|
||||
|
||||
container.frame.containerName = "Order Book Chart";
|
||||
|
||||
var orderBookSnapShot = newOrderBookSnapShot();
|
||||
@@ -213,11 +213,6 @@ function newOrderBookChart() {
|
||||
maxBasePoint = orderBookChart.container.displacement.displaceThisPoint(maxBasePoint);
|
||||
minBasePoint = orderBookChart.container.displacement.displaceThisPoint(minBasePoint);
|
||||
|
||||
/* We apply the zoom factor. */
|
||||
|
||||
minBasePoint = orderBookChart.container.zoom.zoomThisPoint(minBasePoint);
|
||||
maxBasePoint = orderBookChart.container.zoom.zoomThisPoint(maxBasePoint);
|
||||
|
||||
/* Lets start the drawing. */
|
||||
|
||||
browserCanvasContext.beginPath();
|
||||
@@ -247,10 +242,6 @@ function newOrderBookChart() {
|
||||
|
||||
point = orderBookChart.container.displacement.displaceThisPoint(point);
|
||||
|
||||
/* We apply the zoom factor. */
|
||||
|
||||
point = orderBookChart.container.zoom.zoomThisPoint(point);
|
||||
|
||||
browserCanvasContext.lineTo(point.x, point.y);
|
||||
|
||||
|
||||
@@ -298,11 +289,6 @@ function newOrderBookChart() {
|
||||
maxBasePoint = orderBookChart.container.displacement.displaceThisPoint(maxBasePoint);
|
||||
minBasePoint = orderBookChart.container.displacement.displaceThisPoint(minBasePoint);
|
||||
|
||||
/* We apply the zoom factor. */
|
||||
|
||||
minBasePoint = orderBookChart.container.zoom.zoomThisPoint(minBasePoint);
|
||||
maxBasePoint = orderBookChart.container.zoom.zoomThisPoint(maxBasePoint);
|
||||
|
||||
/* Lets start the drawing. */
|
||||
|
||||
browserCanvasContext.beginPath();
|
||||
@@ -327,10 +313,6 @@ function newOrderBookChart() {
|
||||
|
||||
point = orderBookChart.container.displacement.displaceThisPoint(point);
|
||||
|
||||
/* We apply the zoom factor. */
|
||||
|
||||
point = orderBookChart.container.zoom.zoomThisPoint(point);
|
||||
|
||||
browserCanvasContext.lineTo(point.x, point.y);
|
||||
|
||||
}
|
||||
@@ -391,7 +373,7 @@ function newOrderBookChart() {
|
||||
|
||||
point = orderBookChart.container.frame.frameThisPoint(point);
|
||||
point = orderBookChart.container.displacement.displaceThisPoint(point);
|
||||
point = orderBookChart.container.zoom.zoomThisPoint(point);
|
||||
|
||||
|
||||
browserCanvasContext.fillText(label, point.x, point.y);
|
||||
|
||||
|
||||
Reference in new issue
Block a user