[英]Forge Viewer - Markups - can we get xy coordinates of the current selection?
I am using markup extension to draw on my viewer, after drawing, on selection of markup event, can I get its center coordinates of current selection or any coordinates inside of it?我正在使用标记扩展在我的查看器上绘制,绘制后,在选择标记事件时,我可以获得当前选择的中心坐标或其中的任何坐标吗? if not, at least can I get dbId behind current selection?
如果没有,至少我可以在当前选择之后获得 dbId 吗?
Thanks in advance提前致谢
Yelp~ it's the case, and see also: Yelp~原来如此,另见:
// Get the markup's position in browser pixel space. the (0,0) is top left
Markup#getClientPosition()
// Get the markup's bounding rect in browser pixel space.
Markup#getClientSize()
// get the markup's bounding rect in browser pixel space, including the stroke width
Markup#getBoundingRect()
BTW, to obtain dbId within the markup boundary, you can do this:顺便说一句,要在标记边界内获得 dbId,您可以这样做:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.