diff options
| author | bobzel <zzzman@gmail.com> | 2020-12-10 21:41:54 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2020-12-10 21:41:54 -0500 |
| commit | 896db53261aca91de21eabfaa6fed0c1b27e3e51 (patch) | |
| tree | 8b8380c3fd30065a98054714d3d4d2535da81f8a /src/client/views/presentationview/PresElementBox.tsx | |
| parent | dcf5ba2699d7f83f604bedeadea3ba69061a0fd1 (diff) | |
moved opacity and borderRounding into styleProviders. fixed contextMenu clcik from button bar
Diffstat (limited to 'src/client/views/presentationview/PresElementBox.tsx')
| -rw-r--r-- | src/client/views/presentationview/PresElementBox.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/views/presentationview/PresElementBox.tsx b/src/client/views/presentationview/PresElementBox.tsx index 37752d6ee..7eda04930 100644 --- a/src/client/views/presentationview/PresElementBox.tsx +++ b/src/client/views/presentationview/PresElementBox.tsx @@ -21,6 +21,7 @@ import { CurrentUserUtils } from "../../util/CurrentUserUtils"; import { undoBatch } from "../../util/UndoManager"; import { EditableView } from "../EditableView"; import { DocumentManager } from "../../util/DocumentManager"; +import { DocumentViewProps } from "../nodes/DocumentView"; export const presSchema = createSchema({ presentationTargetDoc: Doc, @@ -76,6 +77,10 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps, PresDoc // embedWidth = () => this.props.PanelWidth(); // embedHeight = () => Math.min(this.props.PanelWidth() - 20, this.props.PanelHeight() - this.collapsedHeight); embedWidth = (): number => this.props.PanelWidth() - 35; + styleProvider = (doc: (Doc | undefined), props: DocumentViewProps, property: string): any => { + if (property === "opacity") return 1; + return this.props.styleProvider?.(doc, props, property); + } /** * The function that is responsible for rendering a preview or not for this * presentation element. @@ -87,7 +92,7 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps, PresDoc Document={this.targetDoc} DataDoc={this.targetDoc[DataSym] !== this.targetDoc && this.targetDoc[DataSym]} fitToBox={true} - styleProvider={this.props.styleProvider} + styleProvider={this.styleProvider} rootSelected={returnTrue} addDocument={returnFalse} removeDocument={returnFalse} @@ -102,7 +107,6 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps, PresDoc focus={emptyFunction} whenActiveChanged={returnFalse} bringToFront={returnFalse} - opacity={returnOne} docFilters={this.props.docFilters} docRangeFilters={this.props.docRangeFilters} searchFilterDocs={this.props.searchFilterDocs} |
