diff options
author | bobzel <zzzman@gmail.com> | 2021-09-15 12:42:41 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-09-15 12:42:41 -0400 |
commit | c351117e33c050d237ec2d0d68ec3b078fecc4f7 (patch) | |
tree | 1bfa402d4f40b3bbfb109eb0facfbb1a0a1bb1fe /src/client/views/PropertiesButtons.tsx | |
parent | ed1897d66ef9c982dabc4b4fc4b05d0fb072a127 (diff) |
cleaned up recomputing group bounds to use a reaction
Diffstat (limited to 'src/client/views/PropertiesButtons.tsx')
-rw-r--r-- | src/client/views/PropertiesButtons.tsx | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/client/views/PropertiesButtons.tsx b/src/client/views/PropertiesButtons.tsx index e3de80009..378c67253 100644 --- a/src/client/views/PropertiesButtons.tsx +++ b/src/client/views/PropertiesButtons.tsx @@ -90,12 +90,7 @@ export class PropertiesButtons extends React.Component<{}, {}> { return this.propertyToggleBtn("Grid", "_backgroundGridShow", on => `Display background grid in collection`, on => "border-all"); } @computed get groupButton() { - return this.propertyToggleBtn("Group", "isGroup", on => `Display collection as a Group`, on => "object-group", (dv, doc) => { - doc.isGroup = !doc.isGroup; - doc.forceActive = doc.isGroup; - const dview = dv || DocumentManager.Instance.getFirstDocumentView(doc); - (dview?.ComponentView as CollectionFreeFormView)?.updateGroupBounds?.() - }); + return this.propertyToggleBtn("Group", "isGroup", on => `Display collection as a Group`, on => "object-group", (dv, doc) => { doc.isGroup = !doc.isGroup; doc.forceActive = doc.isGroup; }); } @computed get snapButton() { return this.propertyToggleBtn("Snap\xA0Lines", "showSnapLines", on => `Display snapping lines when objects are dragged`, on => "border-all", undefined, true); |