Skip to content

Commit

Permalink
clone/fragment: broken onDraw / onTouch scripts if cloned widget is a…
Browse files Browse the repository at this point in the history
… canvas
  • Loading branch information
jean-emmanuel committed Jan 21, 2022
1 parent d673cb1 commit feab519
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- bug fixes
- context-menu: double click issue in submenus on small touch screens
- clone/fragment: broken onDraw / onTouch scripts if cloned widget is a canvas

## 1.14.0, 1.14.1

Expand Down
4 changes: 2 additions & 2 deletions src/client/managers/session/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ var converters = [
}
}
if (data.type === 'canvas') {
data.onDraw = data.draw
data.onTouch = data.touch
if (data.draw !== undefined) data.onDraw = data.draw
if (data.touch !== undefined) data.onTouch = data.touch
}

}
Expand Down
2 changes: 2 additions & 0 deletions src/client/widgets/containers/clone.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class Clone extends Container() {

defaults.style = {css: defaults.style.css}

delete defaults.scripting

return defaults

}
Expand Down

0 comments on commit feab519

Please sign in to comment.