diff --git a/.vs/AAWeb/v15/.suo b/.vs/AAWeb/v15/.suo index 75367417b..f9bba8526 100644 Binary files a/.vs/AAWeb/v15/.suo and b/.vs/AAWeb/v15/.suo differ diff --git a/Balls.js b/Balls.js deleted file mode 100644 index 9f0c2c9eb..000000000 --- a/Balls.js +++ /dev/null @@ -1,12 +0,0 @@ - -function updateBallsTargets() { - - /* Whenever there is a change in the currentZoom level, all targets needs to be recalculated in order to fit in the new timeLineCoordinateSystem. */ - - for (var i = 0; i < balls.length; i++) { - - balls[i].updateMass(); - balls[i].updateRadius(); - - } -} \ No newline at end of file diff --git a/Canvas.js b/Canvas.js index 7ff80bca0..ec8346d62 100644 --- a/Canvas.js +++ b/Canvas.js @@ -365,38 +365,7 @@ function newCanvas() { var event = window.event || event; // old IE support let delta = Math.max(-1, Math.min(1, event.wheelDelta || -event.detail)); - let ballIndex = thisObject.floatingSpace.isInside(event.pageX, event.pageY); - - if (ballIndex >= 0) { - - /* 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. - - } else { - - /* We check if the mouse is over any of the existing containers. */ - - let point = { - x: event.pageX, - y: event.pageY - }; - - /* - var container = canvas.chartSpace.getContainer(point); - - if (container !== undefined && container.isZoomeable === true) { - - if (container.zoom.xyZoom(delta) === true) { - - updateBallsTargets(); - - } - - } */ - - viewPort.applyZoom(delta); - } + viewPort.applyZoom(delta); return false; // This instructs the browser not to take the event and scroll the page. } @@ -485,24 +454,6 @@ function newCanvas() { containerBeingDragged.frame.position.y = containerBeingDragged.frame.position.y + displaceVector.y; } - - - - - - /* - if (containerBeingDragged.displacement.displace(diffX, diffY) === true) { - - updateBallsTargets(); // TODO: this should not be here - - } else - { - // If the displacement can not be performed, then we dont abort the dragging operation, just allow the user to move the mouse in some other direction. - } - */ - - - } /* Finally we set the starting point of the new dragVector at this current point. */ diff --git a/Project.njsproj b/Project.njsproj index fb318ddd7..d012c9cb2 100644 --- a/Project.njsproj +++ b/Project.njsproj @@ -34,7 +34,6 @@ - Code @@ -121,7 +120,6 @@ - diff --git a/Zoom.js b/Zoom.js deleted file mode 100644 index 8060099be..000000000 --- a/Zoom.js +++ /dev/null @@ -1,221 +0,0 @@ -/* The Zoom is the factor that amplifies the current container coordinates, and everything included in that container. */ - - -function newZoom() { - - var zoom = { - containerName: "", // This is for debugging purposes only. - parentZoom: undefined, // Here we store the parent cointainer zoom object. - container: undefined, - levelX: 0, // this is the actual zoom level on the x axis. - incrementX: 0.1, - levelY: 0, - incrementY: 0.1, - levelR: -15, - incrementR: 0.05, - levelM: -15, - incrementM: 0.05, - xyZoom: xyZoom, - xZoom: xZoom, - yZoom: yZoom, - rZoom: rZoom, - mZoom: mZoom, - zoomThisPoint: zoomThisPoint, - unzoomThisPoint: unzoomThisPoint, - stack: stack, - level: level - - }; - - return zoom; - - function xyZoom(amount) { - - var tempZoom = newZoom(); - tempZoom.levelX = this.levelX + amount; - tempZoom.levelY = this.levelY + amount; - tempZoom.container = this.container; - tempZoom.parentZoom = this.parentZoom; - - if (this.container.frame.canYouZoomHere(tempZoom)) { - - /* Now we displace */ - - this.levelX = this.levelX + amount; - this.levelY = this.levelY + amount; - - if (this.levelX < -50) { - this.levelX = -50; // There is a minimun zoom level. - } - - if (this.levelY < -50) { - this.levelY = -50; // There is a minimun zoom level. - } - - return true; - } - - return false; - - } - - function xZoom(amount) { - - this.levelX = this.levelX + amount; - - if (this.levelX < -10) { - this.levelX = -10; // There is a minimun zoom level. - } - updateBallsTargets(); - - } - - function yZoom(amount) { - - this.levelY = this.levelY + amount; - - if (this.levelY < -10) { - this.levelY = -10; // There is a minimun zoom level. - } - updateBallsTargets(); - - } - - - function rZoom(amount) { - - this.levelR = this.levelR + amount; - - var zoomLimit = - 1 / this.incrementR; - - if (zoom.levelR <= zoomLimit + 1) { - zoom.levelR = zoomLimit + 2; // There is a minimun zoom level. - } - updateBallsTargets(); - - } - - function mZoom(amount) { - - this.levelM = this.levelM + amount; - - var zoomLimit = - 1 / this.incrementM; - - if (zoom.levelM <= zoomLimit + 1) { - zoom.levelM = zoomLimit + 2; // There is a minimun zoom level. - } - updateBallsTargets(); - - } - - function zoomThisPoint(point) { - - if (this.parentZoom !== undefined) { - - point = this.parentZoom.zoomThisPoint(point); - - } - - /* The zoom center is needed to calculate the zoom for each point within this container. */ - - zoomAxisCenter = { - x: this.container.frame.width / 2, - y: this.container.frame.height / 2 - } - - /* Guess what? yes, the axis center itself must be framed and displaced before being used.*/ - - zoomAxisCenter = this.container.frame.frameThisPoint(zoomAxisCenter); - zoomAxisCenter = this.container.displacement.displaceThisPoint(zoomAxisCenter); - - var diffX = point.x - zoomAxisCenter.x ; - - point.x = zoomAxisCenter.x + diffX + diffX * this.incrementX * this.levelX; - - var diffY = point.y - zoomAxisCenter.y; - - point.y = zoomAxisCenter.y + diffY + diffY * this.incrementY * this.levelY; - - return point; - } - - function unzoomThisPoint(pointWithZoom) { - - if (this.parentZoom !== undefined) { - - pointWithZoom = this.parentZoom.unzoomThisPoint(pointWithZoom); - - } - - /* The zoom center is needed to calculate the zoom for each point within this container. */ - - zoomAxisCenter = { - x: this.container.frame.width / 2, - y: this.container.frame.height / 2 - } - - /* Guess what? yes, the axis center itself must be framed and displaced before being used.*/ - - zoomAxisCenter = this.container.frame.frameThisPoint(zoomAxisCenter); - zoomAxisCenter = this.container.displacement.displaceThisPoint(zoomAxisCenter); - - var pointWithoutZoom = { - x: 0, - y: 0 - } - - pointWithoutZoom.x = (pointWithZoom.x - zoomAxisCenter.x) / (1 + this.incrementX * this.levelX) + zoomAxisCenter.x; - pointWithoutZoom.y = (pointWithZoom.y - zoomAxisCenter.y) / (1 + this.incrementY * this.levelY) + zoomAxisCenter.y; - - return pointWithoutZoom; - - } - - - - - function level() { - - /* This function provides a sense of the zoom level all through the stack of containers object's zoom. */ - - var fullLevel = 0; - - if (this.parentZoom !== undefined) { - - fullLevel = this.parentZoom.level(); - - } - - fullLevel = fullLevel + (this.levelX + this.levelY) / 2; - - return fullLevel; - } - - function stack() { - - /* This function provides the factor by which the stack of cointainers need to be multiplied to aquire the final zoom. */ - - var fullStack = { - x: 1, - y: 1 - } - - if (this.parentZoom !== undefined) { - - fullStack = this.parentZoom.stack(); - - } - - fullStack.x = fullStack.x + fullStack.x * this.levelX * this.incrementX; - fullStack.y = fullStack.y + fullStack.y * this.levelY * this.incrementY; - - return fullStack; - } -} - - - - - - - diff --git a/index.html b/index.html index 6c02b864e..41fd26a43 100644 --- a/index.html +++ b/index.html @@ -28,7 +28,6 @@ - @@ -46,7 +45,6 @@ -