silverstripe-focuspoint
silverstripe-focuspoint copied to clipboard
SS4. Y Axis is wrong in UI element
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
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.