Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Vivek Patel committed May 6, 2022
1 parent f7ff6c2 commit b6033a0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1200,6 +1200,7 @@ class App extends React.Component<AppProps, AppState> {
);
cursorButton[socketId] = user.button;
});
let activeComment = this.state.activeComment;
const renderingElements = this.scene.getElements().filter((element) => {
if (isImageElement(element)) {
if (
Expand Down Expand Up @@ -1227,6 +1228,7 @@ class App extends React.Component<AppProps, AppState> {
canvasX !== this.state.activeComment.canvasX ||
canvasY !== this.state.activeComment.canvasY
) {
activeComment = { element, canvasX, canvasY };
this.props.onActiveCommentUpdate?.(element, canvasX, canvasY);
}
}
Expand Down Expand Up @@ -1284,7 +1286,10 @@ class App extends React.Component<AppProps, AppState> {
if (!this.state.isLoading) {
this.props.onChange?.(
this.scene.getElementsIncludingDeleted(),
this.state,
{
...this.state,
activeComment,
},
this.files,
);
}
Expand Down Expand Up @@ -3601,6 +3606,11 @@ class App extends React.Component<AppProps, AppState> {
canvasX,
canvasY,
};
this.props.onActiveCommentUpdate?.(
hitElement,
canvasX,
canvasY,
);
}

this.setState((prevState) => {
Expand Down
2 changes: 1 addition & 1 deletion src/packages/excalidraw/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@excalidraw/excalidraw",
"version": "0.12.1",
"version": "0.2000.0",
"main": "main.js",
"types": "types/packages/excalidraw/index.d.ts",
"files": [
Expand Down

0 comments on commit b6033a0

Please sign in to comment.