diff options
author | bobzel <zzzman@gmail.com> | 2020-09-15 17:50:06 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-09-15 17:50:06 -0400 |
commit | 08c657346502d7aacbbdb6e7624b13d1a51d8f46 (patch) | |
tree | 70986fd685c9f1f0b7e136aac6f8c8f6c09d34ef /src/client/views/nodes/FontIconBox.tsx | |
parent | fad74a2d613b30a94aad8a65cfd8db7b916a7ea6 (diff) |
rearranged menu items, made a bunch developer mode. fixed setting color via ColorBox of colelctions.
Diffstat (limited to 'src/client/views/nodes/FontIconBox.tsx')
-rw-r--r-- | src/client/views/nodes/FontIconBox.tsx | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/client/views/nodes/FontIconBox.tsx b/src/client/views/nodes/FontIconBox.tsx index a34bf64b0..463f1654e 100644 --- a/src/client/views/nodes/FontIconBox.tsx +++ b/src/client/views/nodes/FontIconBox.tsx @@ -41,18 +41,14 @@ export class FontIconBox extends DocComponent<FieldViewProps, FontIconDocument>( const dragFactory = Cast(this.layoutDoc.dragFactory, Doc, null); dragFactory && this.props.addDocTab(dragFactory, "add:right"); } - dragAsTemplate = (): void => { - this.layoutDoc.onDragStart = ScriptField.MakeFunction('getCopy(this.dragFactory, true)'); - } - useAsPrototype = (): void => { - this.layoutDoc.onDragStart = ScriptField.MakeFunction('makeDelegate(this.dragFactory, true)'); - } + dragAsTemplate = (): void => { this.layoutDoc.onDragStart = ScriptField.MakeFunction('getCopy(this.dragFactory, true)'); } + useAsPrototype = (): void => { this.layoutDoc.onDragStart = ScriptField.MakeFunction('makeDelegate(this.dragFactory, true)'); } specificContextMenu = (): void => { const cm = ContextMenu.Instance; cm.addItem({ description: "Show Template", event: this.showTemplate, icon: "tag" }); - cm.addItem({ description: "Use as Render Template", event: this.dragAsTemplate, icon: "tag" }); - cm.addItem({ description: "Use as Prototype", event: this.useAsPrototype, icon: "tag" }); + !Doc.UserDoc().noviceMode && cm.addItem({ description: "Use as Render Template", event: this.dragAsTemplate, icon: "tag" }); + !Doc.UserDoc().noviceMode && cm.addItem({ description: "Use as Prototype", event: this.useAsPrototype, icon: "tag" }); } componentWillUnmount() { @@ -75,7 +71,7 @@ export class FontIconBox extends DocComponent<FieldViewProps, FontIconDocument>( }}> <div className="menuButton-wrap"> {icon === 'pres-trail' ? presTrailsIcon : <FontAwesomeIcon className={`menuButton-icon-${shape}`} icon={icon} color={color} - size={this.layoutDoc.iconShape === "square" ? "sm" : "lg"} />} + size={this.layoutDoc.iconShape === "square" ? "sm" : "sm"} />} {!label ? (null) : <div className="fontIconBox-label" style={{ color, backgroundColor }}> {label} </div>} {this.props.Document.watchedDocuments ? <FontIconBadge collection={Cast(this.props.Document.watchedDocuments, Doc, null)} /> : (null)} </div> |