silverstripe-focuspoint icon indicating copy to clipboard operation
silverstripe-focuspoint copied to clipboard

SS4. Y Axis is wrong in UI element

Open nikitakulish opened this issue 5 years ago • 1 comments

When selecting focus point on Image in the panel Y Axis is returning wrong values. From the jquery focus point axis you get https://github.com/jonom/jquery-focuspoint/raw/master/demos/img/grid.png that top image should return Y=1, bottom Y=-1 but at the moment it is opposite.

Regarding this the module does not work out of the box with jquery focuspoint

i suggest that this should be noted in the documentation

nikitakulish avatar Sep 10 '19 08:09 nikitakulish

Sorry for the lack of reply here, good catch.

Maybe we introduce a FocusCoord($axis, $convertToLeftTopOffset = true, $multiplier = 1) method for front-end use. Then we could update the examples to use FocusCoord('y', false, -1) to get right value for jQuery FocusPoint v1, FocusCoord('y') for v2 (unreleased) and update PercentageY() to use FocusCoord('y', true, 100) internally.

jonom avatar Dec 17 '19 18:12 jonom