Skip to content

Commit

Permalink
Merge pull request #1682 from Shopify/on-size-copy
Browse files Browse the repository at this point in the history
Update size identity in onSize
  • Loading branch information
chrfalch committed Jun 28, 2023
2 parents f3c1376 + d74fd76 commit 3477306
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions package/cpp/rnskia/RNSkView.h
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,11 @@ class RNSkView : public std::enable_shared_from_this<RNSkView> {

if (w != width || h != height) {
// Update
onSizeObj.setProperty(*runtime, "width", width);
onSizeObj.setProperty(*runtime, "height", height);
self->_onSize->set_current(*runtime, onSize);
auto newValue = jsi::Object(*runtime);
newValue.setProperty(*runtime, "width", width);
newValue.setProperty(*runtime, "height", height);
self->_onSize->set_current(*runtime,
jsi::Value(*runtime, newValue));
}
}
}
Expand Down

0 comments on commit 3477306

Please sign in to comment.