Don't render bounding box for multi-point lines during creation (#799)
* don't render bounding box for multi-point lines during creation * force LayerUI rerender after creating a new point Force LayerUI rerender after creating a new point so that the mobile UI updates and the Done button is visible. * don't select multiElement on confirm is locked Co-authored-by: David Luzar <luzar.david@gmail.com>
This commit is contained in:
parent
43236bed68
commit
e80ab1c8a2
@ -27,6 +27,9 @@ export const actionFinalize: Action = {
|
|||||||
newElements = newElements.slice(0, -1);
|
newElements = newElements.slice(0, -1);
|
||||||
}
|
}
|
||||||
appState.multiElement.shape = null;
|
appState.multiElement.shape = null;
|
||||||
|
if (!appState.elementLocked) {
|
||||||
|
appState.multiElement.isSelected = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!appState.elementLocked || !appState.multiElement) {
|
if (!appState.elementLocked || !appState.multiElement) {
|
||||||
resetCursor();
|
resetCursor();
|
||||||
|
@ -1366,7 +1366,8 @@ export class App extends React.Component<any, AppState> {
|
|||||||
if (this.state.multiElement) {
|
if (this.state.multiElement) {
|
||||||
const { multiElement } = this.state;
|
const { multiElement } = this.state;
|
||||||
const { x: rx, y: ry } = multiElement;
|
const { x: rx, y: ry } = multiElement;
|
||||||
multiElement.isSelected = true;
|
//force LayerUI rerender
|
||||||
|
elements = elements.slice();
|
||||||
multiElement.points.push([x - rx, y - ry]);
|
multiElement.points.push([x - rx, y - ry]);
|
||||||
multiElement.shape = null;
|
multiElement.shape = null;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user