Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(886)

Issue 6741047: Fix for rounding error on drag-relation.

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 7 months ago by matthew.scott
Modified:
11 years, 7 months ago
Reviewers:
mp+130424
Visibility:
Public.

Description

Fix for rounding error on drag-relation. New service blocks have integer x/y coordinates, leading to mouseenter failing at the d.containsPoint() test when one of the mouse coordinates matched exactly with one of the edges of the service block. To reproduce, create two new services (say varnish and node-app) and, without navigating away from the environment view, drag them to be diagonal relative to each other, then try to drag a relation from one to the other through the corner of the service node. Correct behavior (this branch) should be for the drag line to snap to the two nearest connectors (as opposed to passing through the service without recognizing that it had entered). https://code.launchpad.net/~makyo/juju-gui/bad-drag/+merge/130424 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Fix for rounding error on drag-relation. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -4 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M app/views/utils.js View 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 2
matthew.scott
Please take a look.
11 years, 7 months ago (2012-10-18 20:24:55 UTC) #1
matthew.scott
11 years, 7 months ago (2012-10-19 14:33:37 UTC) #2
*** Submitted:

Fix for rounding error on drag-relation.

New service blocks have integer x/y coordinates, leading to mouseenter failing
at the d.containsPoint() test when one of the mouse coordinates matched exactly
with one of the edges of the service block.  To reproduce, create two new
services (say varnish and node-app) and, without navigating away from the
environment view, drag them to be diagonal relative to each other, then try to
drag a relation from one to the other through the corner of the service node. 
Correct behavior (this branch) should be for the drag line to snap to the two
nearest connectors (as opposed to passing through the service without
recognizing that it had entered).

R=
CC=
https://codereview.appspot.com/6741047
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b