diff options
| author | bobzel <zzzman@gmail.com> | 2021-01-04 13:16:13 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2021-01-04 13:16:13 -0500 |
| commit | 93703f4c02c4c6e68489aca72bc0460efc3f6f5e (patch) | |
| tree | 24902b2dc24bbb33dd8518b961e1ff4ef6e5f026 /src/client/views/nodes/DocumentView.tsx | |
| parent | e59f88e1af2ca691bd48188e5bef9e6a4d4e2dab (diff) | |
Fixed filterbox to use scriptContext to determine where to apply/clear filters .fixed setting width/height of freeform images independent of nativeWidth/height so that % css measurements work.
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
| -rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index d72e555a0..e0255405a 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -593,9 +593,9 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps const customScripts = Cast(this.props.Document.contextMenuScripts, listSpec(ScriptField), []); Cast(this.props.Document.contextMenuLabels, listSpec("string"), []).forEach((label, i) => - cm.addItem({ description: label, event: () => customScripts[i]?.script.run({ this: this.layoutDoc, self: this.rootDoc }), icon: "sticky-note" })); + cm.addItem({ description: label, event: () => customScripts[i]?.script.run({ this: this.layoutDoc, scriptContext: this.props.scriptContext, self: this.rootDoc }), icon: "sticky-note" })); this.props.contextMenuItems?.().forEach(item => - item.label && cm.addItem({ description: item.label, event: () => item.script.script.run({ this: this.layoutDoc, self: this.rootDoc }), icon: "sticky-note" })); + item.label && cm.addItem({ description: item.label, event: () => item.script.script.run({ this: this.layoutDoc, scriptContext: this.props.scriptContext, self: this.rootDoc }), icon: "sticky-note" })); const templateDoc = Cast(this.props.Document[StrCast(this.props.Document.layoutKey)], Doc, null); const appearance = cm.findByDescription("UI Controls..."); |
