-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix: BROS-464: Vector region selection #8636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
65b2aa4
34f2f87
6327bc8
404fa3f
2d9761d
f9a146b
6707960
907d954
3abb78d
8029b1d
8a5da16
534c70b
9d3fd64
4988900
0b27edc
64c6e63
859fea5
740f58d
6dbb498
df204ab
c61d17e
f7a3fd0
06ba828
7def038
6b3b526
49c7d84
774a75d
a1b6706
e319cbc
9388c02
df5814e
5b68d5d
9e2a991
65b5279
cf3b233
76f229d
3a799cd
3033a21
4784cf1
78c0249
0cb1a04
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -174,6 +174,17 @@ export default class TransformerComponent extends Component { | |
| }); | ||
| }; | ||
|
|
||
| applyRegionsTransform = () => { | ||
| if (!this.transformer) return; | ||
|
|
||
| const { item } = this.props; | ||
| const { selectedRegions } = item; | ||
|
|
||
| selectedRegions.forEach((region) => { | ||
| region.applyTransform?.({}, null); | ||
| }); | ||
| }; | ||
|
|
||
| renderLSTransformer() { | ||
| return ( | ||
| <> | ||
|
|
@@ -214,10 +225,14 @@ export default class TransformerComponent extends Component { | |
| }} | ||
| dragBoundFunc={this.dragBoundFunc} | ||
| onDragEnd={() => { | ||
| // Call applyTransform for VectorRegion instances | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Move this comment to the method itself. Why? Here it reads naturally and feels a good fit, you don't need to describe it using one specific tag. But the method itself could use a description saying that it's applied just to one specific tag and also with explanation why only for this one tag. |
||
| this.applyRegionsTransform(); | ||
| this.unfreeze(); | ||
| setTimeout(this.checkNode); | ||
| }} | ||
| onTransformEnd={() => { | ||
| // Call applyTransform for VectorRegion instances | ||
| this.applyRegionsTransform(); | ||
| setTimeout(this.checkNode); | ||
| }} | ||
| backSelector={this.props.draggableBackgroundSelector} | ||
|
|
@@ -262,10 +277,14 @@ export default class TransformerComponent extends Component { | |
| }} | ||
| dragBoundFunc={this.dragBoundFunc} | ||
| onDragEnd={() => { | ||
| // Call applyTransform for VectorRegion instances | ||
| this.applyRegionsTransform(); | ||
| this.unfreeze(); | ||
| setTimeout(this.checkNode); | ||
| }} | ||
| onTransformEnd={() => { | ||
| // Call applyTransform for VectorRegion instances | ||
| this.applyRegionsTransform(); | ||
| setTimeout(this.checkNode); | ||
| }} | ||
| backSelector={this.props.draggableBackgroundSelector} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the full-scaled doc, not description. Move this text to other place (jsdoc, .md file, etc) and make description short and without markdown