Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpguilet2016-08-03 09:39:27 +0000
committerLaurent Redor2016-08-05 08:54:20 +0000
commit17f90cf7d90d3ba2861a7428e1e9640d7f842ec4 (patch)
tree2643f7a94744073734cd60ad10e4461cb01f7824
parentd06fc51b23fbfdb74e8b553748dcb937dcf01a74 (diff)
downloadorg.eclipse.sirius-17f90cf7d90d3ba2861a7428e1e9640d7f842ec4.tar.gz
org.eclipse.sirius-17f90cf7d90d3ba2861a7428e1e9640d7f842ec4.tar.xz
org.eclipse.sirius-17f90cf7d90d3ba2861a7428e1e9640d7f842ec4.zip
[498494] Specification for mouse scroll zoom applied on mouse location
Bug: 498494 Change-Id: I5aad381ce0a33f76860b1d61b27722c948c74371 Signed-off-by: pguilet <pierre.guilet@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.doc/.settings/org.eclipse.core.resources.prefs1
-rw-r--r--plugins/org.eclipse.sirius.doc/specs/proposal/498494_ScrollZoomOnMouse/498494.html101
-rw-r--r--plugins/org.eclipse.sirius.doc/specs/proposal/498494_ScrollZoomOnMouse/498494.textile71
-rw-r--r--plugins/org.eclipse.sirius.doc/specs/proposal/498494_ScrollZoomOnMouse/zoomSpecificationExample.pngbin0 -> 85185 bytes
4 files changed, 173 insertions, 0 deletions
diff --git a/plugins/org.eclipse.sirius.doc/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.sirius.doc/.settings/org.eclipse.core.resources.prefs
index e0ef7eb48f..a642bf1589 100644
--- a/plugins/org.eclipse.sirius.doc/.settings/org.eclipse.core.resources.prefs
+++ b/plugins/org.eclipse.sirius.doc/.settings/org.eclipse.core.resources.prefs
@@ -24,4 +24,5 @@ encoding//specs/proposal/490360_SnapToShapeForBorderNodes/490360.html=UTF-8
encoding//specs/proposal/491895_paste_special/491895.html=UTF-8
encoding//specs/proposal/496466_extendCopyPasteLayout/496466.html=UTF-8
encoding//specs/proposal/498869_edgeAndPortsCompoundMoves_multiSelection/498869.html=utf-8
+encoding//specs/proposal/498494_ScrollZoomOnMouse/498494.html=UTF-8
encoding//specs/proposal/connections_to_figure_border/connections_between_figures_borders_and_edges.html=utf-8
diff --git a/plugins/org.eclipse.sirius.doc/specs/proposal/498494_ScrollZoomOnMouse/498494.html b/plugins/org.eclipse.sirius.doc/specs/proposal/498494_ScrollZoomOnMouse/498494.html
new file mode 100644
index 0000000000..12e7692b8e
--- /dev/null
+++ b/plugins/org.eclipse.sirius.doc/specs/proposal/498494_ScrollZoomOnMouse/498494.html
@@ -0,0 +1,101 @@
+<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ </head>
+ <body>
+ <h1 id="SiriusEvolutionSpecificationMousescrollzoomondiagramisdoneonmouselocation">Sirius Evolution Specification: Mouse scroll zoom on diagram is done on mouse location</h1>
+ <h2 id="Preamble">Preamble</h2>
+ <p>
+ <em>Summary</em>: Diagram mouse scroll zoom is based on mouse location instead of diagram editor view center
+ </p>
+ <table>
+ <tr>
+ <th>Version</th>
+ <th>Status</th>
+ <th>Date</th>
+ <th>Authors</th>
+ <th>Changes</th>
+ </tr>
+ <tr>
+ <td>v0.1</td>
+ <td>DRAFT</td>
+ <td>2016-07-26</td>
+ <td>pguilet</td>
+ <td>Initial version.</td>
+ </tr>
+ <tr>
+ <td>v0.2</td>
+ <td>PROPOSAL</td>
+ <td>2016-08-05</td>
+ <td>pguilet</td>
+ <td>Initial version.</td>
+ </tr>
+ </table>
+ <p>
+ <em>Relevant tickets</em>:
+ </p>
+ <ul>
+ <li>
+ <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=498494">Bug 498494 - Mouse scroll zoom should be based on mouse location for an easier use instead of diagram editor view center</a>
+ </li>
+ </ul>
+ <h2 id="Introduction">Introduction</h2>
+ <p>Currently the mouse scroll zoom on a diagram works as the following:</p>
+ <ul>
+ <li>We do a scroll with the mouse when hitting CTRL keyboard key.</li>
+ <li>The zoom is applied on the point at the center of the view</li>
+ </ul>
+ <p>This make difficult to zoom to an element not around the center of the view because after the zoom, the element can be out of the screen and we will have to scroll to see it.</p>
+ <p>So to avoid to have to scroll after zooming, the zoom will be done on the point behind the mouse to zoom directly the element targeted. This point will be kept at its view location when possible.</p>
+ <h2 id="DetailedSpecification">Detailed Specification</h2>
+ <h3 id="Simplemousescrollzoomspecification">Simple mouse scroll zoom specification</h3>
+ <p>The implications of a zoom done on the point behind the mouse location is the following :</p>
+ <ul>
+ <li>The diagram is zoomed (in or out)</li>
+ <li>The view on the diagram is updated so the point behind the mouse is kept at the same view position if possible. We have different cases regarding the positioning of the zoomed point :
+ <ul>
+ <li>Zoom expansion is done from the top left corner of the view. This is the view origin point. Positioning is done on two axis x et y. For each axis, the positioning can be :
+ <ul>
+ <li>partial because the zoomed zone is near one or several boundaries of the diagram so you cannot scroll beyond. Zoom does not extend the diagram. The x or y coordinate is put as close as possible of the mouse location.</li>
+ <li>or complete if there is enough space between the diagram boundaries and the zoomed point to have it without shifting it from the mouse location (usually this means we have scroll bars). For example, lets consider the following case were we zoom-in :
+ <img border="0" src="zoomSpecificationExample.png"/>
+ <ul>
+ <li>If a zoom in is done in the left upper zone, the positioning will be partial for the x and y axis because with the zoom applied, we can&#8217;t extend the left and upper side of the diagram. Zoom is all about making a diagram bigger regarding a ratio and not modifying the original width and length. So instead of being under the mouse location, the original zoom point will be shifted to the right and bottom. </li>
+ <li>If a zoom in is done in the left lower zone and is not enough to, the positioning will be partial for the x axis because with the zoom applied, we can&#8217;t extend the left side of the diagram. So instead of being under the mouse location, the original zoom point will be shifted to the right. But the positioning of the y axis will be complete because the lower side is not the boundary of the diagram and there is enough space below to do the positioning at mouse location even with the zoom.</li>
+ <li>If a zoom in is done in the right lower zone, the positioning will be complete for the x and y axis because there is enough space below the lower side and after the right side of the view to do the positioning under the mouse without seeing diagram boundaries on view that would make a shift of the original zoom point.</li>
+ <li>If a zoom in is done in the right upper zone, the positioning will be partial for the y axis because with the zoom applied, we can&#8217;t extend the upper side of the diagram. So instead of being under the mouse location, the original zoom point will be shifted to the bottom. But the positioning of the x axis will be complete because the lower side is not the boundary of the diagram and there is enough space below to do the centering even with the zoom.</li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <p>***For a zoom-out, it works the same excepted that when boundaries are visible on the view after the zoom then the zoom point will be shifted towards top left location on the view instead of being expanded to the bottom right.</p>
+ <h3 id="Multiplemousescrollzoomspecification">Multiple mouse scroll zoom specification</h3>
+ <p>In case of a succession of mouse scroll, each scroll will be handled independently from the other.
+ <br/>We have different cases regarding a zoom done with more than one mouse scroll.
+ </p>
+ <p>For zoom-in :</p>
+ <ul>
+ <li>Either the point we want to zoom in around is not near diagram boundary from a view viewpoint after the zoom applications. In this case a zoom in will keep the original point at the same view location.</li>
+ <li>Or the zone we want to zoom in is closed to a diagram boundary visible on view after zoom applications. In this case, it is possible that we have we will have to readjust the mouse position by scrolling after some zoom-in to continue to zoom the wanted point because it will be shifted each zoom on a direction opposed to the diagram boundary visible on the view and if the zoom is strong then it can be put outside the view.</li>
+ </ul>
+ <p>For zoom-out :</p>
+ <ul>
+ <li>Either the point we want to zoom out around is not near diagram boundary from a view viewpoint after the zoom applications. In this case a zoom out will keep the original point at the same view location.</li>
+ <li>Or the zone we want to zoom out make the one ore more diagram boundaries visible on the screen after zoom applications. In this case, the zoomed point will be shifted to the top left locations regarding boundaries visible.</li>
+ </ul>
+ <h2 id="BackwardCompatibilityandMigrationPaths">Backward Compatibility and Migration Paths</h2>
+ <h3 id="DocumentationChanges">Documentation Changes</h3>
+ <p>The User documentation will be updated to describe the possibility to zoom in or out with the mouse wheel and the keyboard key CTRL.</p>
+ <h2 id="TestsandNonregressionstrategy">Tests and Non-regression strategy</h2>
+ <ul>
+ <li>A test must be done for zoom-in and out when after zoom, no boundary is visible. (The zoomed point is kept under the mouse on the view).</li>
+ <li>A test must be done when diagram boundaries are visible on the view after a zoom in. The zoomed point must be shifted at the right location.</li>
+ <li>A test must be done when diagram boundaries are visible on the view after a zoom out. The zoomed point must be shifted at the right location.</li>
+ </ul>
+ <h2 id="Implementationchoicesandtradeoffs">Implementation choices and tradeoffs</h2>
+ </body>
+</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.sirius.doc/specs/proposal/498494_ScrollZoomOnMouse/498494.textile b/plugins/org.eclipse.sirius.doc/specs/proposal/498494_ScrollZoomOnMouse/498494.textile
new file mode 100644
index 0000000000..e6bd8fa307
--- /dev/null
+++ b/plugins/org.eclipse.sirius.doc/specs/proposal/498494_ScrollZoomOnMouse/498494.textile
@@ -0,0 +1,71 @@
+h1. Sirius Evolution Specification: Mouse scroll zoom on diagram is done on mouse location
+
+h2. Preamble
+
+_Summary_: Diagram mouse scroll zoom is based on mouse location instead of diagram editor view center
+
+|_. Version |_. Status |_. Date |_. Authors |_. Changes |
+| v0.1 | DRAFT | 2016-07-26 | pguilet | Initial version. |
+| v0.2 | PROPOSAL | 2016-08-05 | pguilet | Initial version. |
+
+_Relevant tickets_:
+* "Bug 498494 - Mouse scroll zoom should be based on mouse location for an easier use instead of diagram editor view center":https://bugs.eclipse.org/bugs/show_bug.cgi?id=498494
+
+h2. Introduction
+
+Currently the mouse scroll zoom on a diagram works as the following:
+
+* We do a scroll with the mouse when hitting CTRL keyboard key.
+* The zoom is applied on the point at the center of the view
+
+This make difficult to zoom to an element not around the center of the view because after the zoom, the element can be out of the screen and we will have to scroll to see it.
+
+So to avoid to have to scroll after zooming, the zoom will be done on the point behind the mouse to zoom directly the element targeted. This point will be kept at its view location when possible.
+
+
+h2. Detailed Specification
+
+h3. Simple mouse scroll zoom specification
+
+The implications of a zoom done on the point behind the mouse location is the following :
+* The diagram is zoomed (in or out)
+* The view on the diagram is updated so the point behind the mouse is kept at the same view position if possible. We have different cases regarding the positioning of the zoomed point :
+** Zoom expansion is done from the top left corner of the view. This is the view origin point. Positioning is done on two axis x et y. For each axis, the positioning can be :
+*** partial because the zoomed zone is near one or several boundaries of the diagram so you cannot scroll beyond. Zoom does not extend the diagram. The x or y coordinate is put as close as possible of the mouse location.
+*** or complete if there is enough space between the diagram boundaries and the zoomed point to have it without shifting it from the mouse location (usually this means we have scroll bars). For example, lets consider the following case were we zoom-in :!zoomSpecificationExample.png!
+**** If a zoom in is done in the left upper zone, the positioning will be partial for the x and y axis because with the zoom applied, we can't extend the left and upper side of the diagram. Zoom is all about making a diagram bigger regarding a ratio and not modifying the original width and length. So instead of being under the mouse location, the original zoom point will be shifted to the right and bottom.
+**** If a zoom in is done in the left lower zone and is not enough to, the positioning will be partial for the x axis because with the zoom applied, we can't extend the left side of the diagram. So instead of being under the mouse location, the original zoom point will be shifted to the right. But the positioning of the y axis will be complete because the lower side is not the boundary of the diagram and there is enough space below to do the positioning at mouse location even with the zoom.
+**** If a zoom in is done in the right lower zone, the positioning will be complete for the x and y axis because there is enough space below the lower side and after the right side of the view to do the positioning under the mouse without seeing diagram boundaries on view that would make a shift of the original zoom point.
+**** If a zoom in is done in the right upper zone, the positioning will be partial for the y axis because with the zoom applied, we can't extend the upper side of the diagram. So instead of being under the mouse location, the original zoom point will be shifted to the bottom. But the positioning of the x axis will be complete because the lower side is not the boundary of the diagram and there is enough space below to do the centering even with the zoom.
+***For a zoom-out, it works the same excepted that when boundaries are visible on the view after the zoom then the zoom point will be shifted towards top left location on the view instead of being expanded to the bottom right.
+
+h3. Multiple mouse scroll zoom specification
+
+In case of a succession of mouse scroll, each scroll will be handled independently from the other.
+We have different cases regarding a zoom done with more than one mouse scroll.
+
+
+For zoom-in :
+* Either the point we want to zoom in around is not near diagram boundary from a view viewpoint after the zoom applications. In this case a zoom in will keep the original point at the same view location.
+* Or the zone we want to zoom in is closed to a diagram boundary visible on view after zoom applications. In this case, it is possible that we have we will have to readjust the mouse position by scrolling after some zoom-in to continue to zoom the wanted point because it will be shifted each zoom on a direction opposed to the diagram boundary visible on the view and if the zoom is strong then it can be put outside the view.
+
+For zoom-out :
+* Either the point we want to zoom out around is not near diagram boundary from a view viewpoint after the zoom applications. In this case a zoom out will keep the original point at the same view location.
+* Or the zone we want to zoom out make the one ore more diagram boundaries visible on the screen after zoom applications. In this case, the zoomed point will be shifted to the top left locations regarding boundaries visible.
+
+h2. Backward Compatibility and Migration Paths
+
+h3. Documentation Changes
+
+The User documentation will be updated to describe the possibility to zoom in or out with the mouse wheel and the keyboard key CTRL.
+
+
+h2. Tests and Non-regression strategy
+
+* A test must be done for zoom-in and out when after zoom, no boundary is visible. (The zoomed point is kept under the mouse on the view).
+* A test must be done when diagram boundaries are visible on the view after a zoom in. The zoomed point must be shifted at the right location.
+* A test must be done when diagram boundaries are visible on the view after a zoom out. The zoomed point must be shifted at the right location.
+
+h2. Implementation choices and tradeoffs
+
+
diff --git a/plugins/org.eclipse.sirius.doc/specs/proposal/498494_ScrollZoomOnMouse/zoomSpecificationExample.png b/plugins/org.eclipse.sirius.doc/specs/proposal/498494_ScrollZoomOnMouse/zoomSpecificationExample.png
new file mode 100644
index 0000000000..b74264a29f
--- /dev/null
+++ b/plugins/org.eclipse.sirius.doc/specs/proposal/498494_ScrollZoomOnMouse/zoomSpecificationExample.png
Binary files differ

Back to the top