Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 497584

Summary: Ensure GeometryNode aligns its clickable area shape with its geometry shape.
Product: [Tools] GEF Reporter: Matthias Wienand <matthias.wienand>
Component: GEF FXAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.0.0   
Target Milestone: 4.1.0 (Neon.1) M1   
Hardware: All   
OS: All   
Whiteboard:

Description Matthias Wienand CLA 2016-07-08 10:59:10 EDT
Currently, the GeometryNode uses two different mechanisms to update its clickable area shape. 1) Upon initialization, the geometric shape's path elements are copied into the clickable area shape. 2) Upon further visual changes, the geometric shape's path elements are translated by negative layout-x and layout-y before copying them into the clickable area shape.

Therefore, the clickable area shape is offsetted after initialization. It is only aligned with the geometric shape after the first update.

In order to fix the issue, the path elements need to be translated by negative layout-x and layout-y when initializing the clickable area shape as follows:

Within GeometryNode#setGeometricShape():

    // create and configure clickable area shape
    clickableAreaShape = new Path(getPathElements());
Comment 1 Matthias Wienand CLA 2016-07-15 08:02:08 EDT
I replaced the relevant code so that the clickable area is correctly aligned. The code is published on the R4_0_maintenance and master branches. Therefore, I resolve this ticket as fixed for 4.1.0 M1.