I’m using boxAnnotation Object with some properties
I use
.withDragDirections(Direction2D.XDirection)
.withResizeDirections(Direction2D.XDirection)
for resize and drag only x direction
It looks like drag and resize only x direction but the box resize y direction a little bit
I do not use any special properties using boxAnnotation
use of course .withIsEditable for editing
.withPosition, .withBackgroundDrawableId
that’ it
and I also wonder when i declare new CustomIResizingGrip object with new Canvas
why withDragDirections, withResizeDirections dont work?
- cy bang asked 4 years ago
- You must login to post comments
Wow finally it works on version 3.1.0.4412
thx a lot
and i have a last question
i use two boxes annotation with CustomIResizingGrip implements IResizingGrip
that works well but when i select one box, I can not do anything except selected box
i guess cuz of isHit in custom IResizingGrip always return true
so i add a condition to return false if i touch out of box
so now definitely it works but do i have to add condition for ended customizing of box?
- cy bang answered 4 years ago
-
Yes, you should implement isHit() to check if specified hit point is within your custom resizing grip and return false if point lies outside.
-
thx for everything im gonna close this question
- You must login to post comments
Hi there,
Yes, it looks like annotation is moved abit in Y direction on first touch on resizing grip. I’m going to create a task to investigate why this happens.
Regarding second part – can you provide more information ( code to reproduce and more detailed description of what you’re trying to achieve vs what you have now )?
Thanks in advance.
Best regards,
Yura
- Yura Khariton answered 4 years ago
- last edited 4 years ago
-
i appreciate your help i use customIResizingGrip for changing grip looks like first picture and declare withDragDirections(Direction2D.XDirection), withResizeDirections(Direction2D.XDirection) with newBoxAnnotation(). what i wanna do is i do want resize and drag box only x direction. the height of box is just fixed. but when i touch box wherever inside or outside, the box is just ignored and resized x,y both direction even if i used withResizeDirections(Direction2D.XDirection) after i touched box first. i wondering withDragDirectionsl, withResizeDirections properties working.
- You must login to post comments
comment of comment is doesn’t good for reading i replyed my answer!
it same as well =)
i appreciate your help
i use customIResizingGrip for changing grip looks like first picture and declare withDragDirections(Direction2D.XDirection), withResizeDirections(Direction2D.XDirection)
with newBoxAnnotation().
what i wanna do is i do want resize and drag box only x direction. the height of box is just fixed.
but when i touch box wherever inside or outside, the box is just ignored and resized x,y both direction even if i used withResizeDirections(Direction2D.XDirection) after i touched box first.
i wondering withDragDirectionsl, withResizeDirections properties working.
- cy bang answered 4 years ago
-
Can you check the latest nightly build from Maven ( v3.1.0.4412 )? I think that issue with small offsetting of annotation when ResizeDirections is set should be fixed now.
- You must login to post comments