diff options
Diffstat (limited to 'src/client/views/nodes')
| -rw-r--r-- | src/client/views/nodes/CollectionFreeFormDocumentView.tsx | 2 | ||||
| -rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 4 | ||||
| -rw-r--r-- | src/client/views/nodes/FilterBox.tsx | 1 | ||||
| -rw-r--r-- | src/client/views/nodes/SliderBox-components.tsx | 3 | ||||
| -rw-r--r-- | src/client/views/nodes/SliderBox.scss | 12 | ||||
| -rw-r--r-- | src/client/views/nodes/SliderBox.tsx | 7 |
6 files changed, 22 insertions, 7 deletions
diff --git a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx index bfb6e8fc8..09d89170c 100644 --- a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx +++ b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx @@ -169,6 +169,8 @@ export class CollectionFreeFormDocumentView extends DocComponent<CollectionFreeF return <div className={"collectionFreeFormDocumentView-container"} style={{ outline: this.Highlight ? "orange solid 2px" : "", + width: this.panelWidth(), + height: this.panelHeight(), transform: this.transform, transition: this.props.dataTransition ? this.props.dataTransition : this.dataProvider ? this.dataProvider.transition : StrCast(this.layoutDoc.dataTransition), zIndex: this.ZInd, diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index affbb4017..4cbb55cd0 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -596,9 +596,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..."); diff --git a/src/client/views/nodes/FilterBox.tsx b/src/client/views/nodes/FilterBox.tsx index 29fd84492..d81fd9fe7 100644 --- a/src/client/views/nodes/FilterBox.tsx +++ b/src/client/views/nodes/FilterBox.tsx @@ -268,6 +268,7 @@ export class FilterBox extends ViewBoxBaseComponent<FieldViewProps, FilterBoxDoc onCheckedClick={this.scriptField} dontRegisterView={true} styleProvider={this.props.styleProvider} + scriptContext={this.props.scriptContext} moveDocument={returnFalse} removeDocument={returnFalse} addDocument={returnFalse} /> diff --git a/src/client/views/nodes/SliderBox-components.tsx b/src/client/views/nodes/SliderBox-components.tsx index 874a1108f..e19f28f08 100644 --- a/src/client/views/nodes/SliderBox-components.tsx +++ b/src/client/views/nodes/SliderBox-components.tsx @@ -11,7 +11,6 @@ const railStyle: React.CSSProperties = { position: "absolute", width: "100%", height: 40, - top: -13, borderRadius: 7, cursor: "pointer", opacity: 0.3, @@ -231,7 +230,7 @@ export function Tick({ tick, count, format = defaultFormat }: TickProps) { <div style={{ position: "absolute", - marginTop: 17, + marginTop: 20, width: 1, height: 5, backgroundColor: "rgb(200,200,200)", diff --git a/src/client/views/nodes/SliderBox.scss b/src/client/views/nodes/SliderBox.scss index a896ffa87..4206a368d 100644 --- a/src/client/views/nodes/SliderBox.scss +++ b/src/client/views/nodes/SliderBox.scss @@ -4,6 +4,16 @@ border-radius: inherit; display: flex; flex-direction: column; - top: 7px; position: relative; + .slider-tracks { + top: 7px; + position: relative; + } + .slider-ticks { + position: relative; + } + .slider-handles { + top: 7px; + position: relative; + } }
\ No newline at end of file diff --git a/src/client/views/nodes/SliderBox.tsx b/src/client/views/nodes/SliderBox.tsx index c30dcde54..bfe07c22b 100644 --- a/src/client/views/nodes/SliderBox.tsx +++ b/src/client/views/nodes/SliderBox.tsx @@ -41,7 +41,10 @@ export class SliderBox extends ViewBoxBaseComponent<FieldViewProps, SliderDocume onChange = (values: readonly number[]) => runInAction(() => { this.dataDoc[this.minThumbKey] = values[0]; this.dataDoc[this.maxThumbKey] = values[1]; - Cast(this.layoutDoc.onThumbChanged, ScriptField, null)?.script.run({ self: this.rootDoc, range: values, this: this.layoutDoc }); + Cast(this.layoutDoc.onThumbChanged, ScriptField, null)?.script.run({ + self: this.rootDoc, + scriptContext: this.props.scriptContext, range: values, this: this.layoutDoc + }); }) render() { @@ -103,7 +106,7 @@ export class SliderBox extends ViewBoxBaseComponent<FieldViewProps, SliderDocume </Tracks> <Ticks count={5}> {({ ticks }) => ( - <div className="slider-tracks"> + <div className="slider-ticks"> {ticks.map((tick) => ( <Tick key={tick.id} |
