From 14bc3337ce2c2ca87f4b11765414a7ee1bb12bba Mon Sep 17 00:00:00 2001 From: yunahi <60233430+yunahi@users.noreply.github.com> Date: Wed, 29 Jul 2020 00:14:37 +0900 Subject: test --- src/client/views/collections/CollectionMenu.tsx | 35 ++++++++++++++++--------- 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'src/client/views/collections/CollectionMenu.tsx') diff --git a/src/client/views/collections/CollectionMenu.tsx b/src/client/views/collections/CollectionMenu.tsx index 0b30b5a5f..4fa2e51e8 100644 --- a/src/client/views/collections/CollectionMenu.tsx +++ b/src/client/views/collections/CollectionMenu.tsx @@ -25,6 +25,7 @@ import { SelectionManager } from "../../util/SelectionManager"; import { DocumentView } from "../nodes/DocumentView"; import { ColorState } from "react-color"; import { ObjectField } from "../../../fields/ObjectField"; +import { IconProp, library } from '@fortawesome/fontawesome-svg-core'; @observer export default class CollectionMenu extends AntimodeMenu { @@ -342,11 +343,17 @@ export class CollectionFreeFormViewChrome extends React.Component {this._draw.map((icon, i) => - )} ; } @@ -430,11 +439,11 @@ export class CollectionFreeFormViewChrome extends React.Component {widthPicker} - {this._width.map(wid => - )} ; } @@ -474,7 +483,7 @@ export class CollectionFreeFormViewChrome extends React.Component FormatShapePane.Instance.Pinned = !FormatShapePane.Instance.Pinned)} style={{ backgroundColor: this._fillBtn ? "121212" : "" }}> - + ; } @@ -503,10 +512,10 @@ export class CollectionFreeFormViewChrome extends React.Component + {this.drawButtons} {this.widthPicker} {this.colorPicker} {this.fillPicker} - {this.drawButtons} {this.formatPane} : (null) -- cgit v1.2.3-70-g09d2 From ef235dfa63709656af35fa3deaf53529abd3ee4c Mon Sep 17 00:00:00 2001 From: yunahi <60233430+yunahi@users.noreply.github.com> Date: Wed, 29 Jul 2020 00:48:20 +0900 Subject: moved inkmenu to collectionMenu --- src/client/views/DocumentDecorations.tsx | 1 - src/client/views/collections/CollectionMenu.tsx | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/client/views/collections/CollectionMenu.tsx') diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index 3d258430e..c5e0a3303 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -526,7 +526,6 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> SelectionManager.SelectedDocuments().forEach(action((element: DocumentView, index) => { const doc = Document(element.rootDoc); if (doc.type === DocumentType.INK && doc.x && doc.y && doc._height && doc._width) { - console.log(doc.x, doc.y, doc._height, doc._width); const ink = Cast(doc.data, InkField)?.inkData; if (ink) { const newPoints: { X: number, Y: number }[] = []; diff --git a/src/client/views/collections/CollectionMenu.tsx b/src/client/views/collections/CollectionMenu.tsx index 4fa2e51e8..f3b82df83 100644 --- a/src/client/views/collections/CollectionMenu.tsx +++ b/src/client/views/collections/CollectionMenu.tsx @@ -26,6 +26,8 @@ import { DocumentView } from "../nodes/DocumentView"; import { ColorState } from "react-color"; import { ObjectField } from "../../../fields/ObjectField"; import { IconProp, library } from '@fortawesome/fontawesome-svg-core'; +import { faBold, faItalic, faChevronLeft, faUnderline, faStrikethrough, faSubscript, faSuperscript, faIndent, faEyeDropper, faCaretDown, faPalette, faArrowsAlt, faHighlighter, faLink, faPaintRoller, faSleigh, faBars, faFillDrip, faBrush, faPenNib, faShapes, faArrowLeft, faEllipsisH, faBezierCurve, faArrowRight, faArrowsAltH, faMinus, faCircle, faExclamationTriangle, faSquare, faLongArrowAltRight, faPenFancy, faCaretSquareRight, faAngleDoubleRight, } from "@fortawesome/free-solid-svg-icons"; +library.add(faBold, faItalic, faChevronLeft, faUnderline, faStrikethrough, faSuperscript, faSubscript, faIndent, faEyeDropper, faCaretDown, faPalette, faArrowsAlt, faHighlighter, faLink, faPaintRoller, faBars, faFillDrip, faBrush, faPenNib, faShapes, faArrowLeft, faEllipsisH, faBezierCurve, faLongArrowAltRight, faArrowsAltH, faMinus, faCircle, faSquare, faSquare, faPenFancy, faAngleDoubleRight,); @observer export default class CollectionMenu extends AntimodeMenu { -- cgit v1.2.3-70-g09d2 From 57c07152904762c790e3a3bb2003d389983990d8 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Wed, 29 Jul 2020 09:46:31 -0400 Subject: streamlined settin link follow tarets a bit by addin a follow link draggable UI button --- src/client/views/collections/CollectionMenu.tsx | 19 ++++++++++++++++++- src/fields/ScriptField.ts | 4 ++++ 2 files changed, 22 insertions(+), 1 deletion(-) (limited to 'src/client/views/collections/CollectionMenu.tsx') diff --git a/src/client/views/collections/CollectionMenu.tsx b/src/client/views/collections/CollectionMenu.tsx index 47670eb26..3eda2e2f2 100644 --- a/src/client/views/collections/CollectionMenu.tsx +++ b/src/client/views/collections/CollectionMenu.tsx @@ -25,6 +25,7 @@ import { SelectionManager } from "../../util/SelectionManager"; import { DocumentView } from "../nodes/DocumentView"; import { ColorState } from "react-color"; import { ObjectField } from "../../../fields/ObjectField"; +import { ScriptField } from "../../../fields/ScriptField"; @observer export default class CollectionMenu extends AntimodeMenu { @@ -116,6 +117,22 @@ export class CollectionViewBaseChrome extends React.Component { }), initialize: emptyFunction, }; + _openLinkInCommand = { + params: ["target", "container"], title: "link follow target", + script: `{ if (self.container?.length) { + getProto(self.target).linkContainer = self.container[0]; + getProto(self.target).isLinkButton = true; + getProto(self.target).onClick = makeScript("getProto(self.linkContainer).data = new List([self.links[0]?.anchor2])"); + }}`, + immediate: undoBatch((container: Doc[]) => { + if (container.length) { + Doc.GetProto(this.target).linkContainer = container[0]; + Doc.GetProto(this.target).isLinkButton = true; + Doc.GetProto(this.target).onClick = ScriptField.MakeScript("getProto(self.linkContainer).data = new List([self.links[0]?.anchor2])"); + } + }), + initialize: emptyFunction, + }; _viewCommand = { params: ["target"], title: "bookmark view", script: "self.target._panX = self['target-panX']; self.target._panY = self['target-panY']; self.target._viewScale = self['target-viewScale'];", @@ -145,7 +162,7 @@ export class CollectionViewBaseChrome extends React.Component (i <= index && x !== undefined) || p === undefined ? x : p, undefined as any); }, "returns the value at a given index of a list", "(list: any[], index: number)"); +Scripting.addGlobal(function makeScript(script: string) { + return ScriptField.MakeScript(script); +}, "returns the value at a given index of a list", "(list: any[], index: number)"); + export namespace ComputedField { let useComputed = true; export function DisableComputedFields() { -- cgit v1.2.3-70-g09d2 From 0514d32ab83cc95e35e1fb855c3450f0c1984f9e Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Wed, 29 Jul 2020 14:18:53 -0400 Subject: fixed color box -- why was it commented out?? fixed workspace so that it can't be converted to another cllecction type --- src/client/views/collections/CollectionMenu.tsx | 13 ++++++-- src/client/views/nodes/ColorBox.tsx | 44 ++++++++++++------------- 2 files changed, 31 insertions(+), 26 deletions(-) (limited to 'src/client/views/collections/CollectionMenu.tsx') diff --git a/src/client/views/collections/CollectionMenu.tsx b/src/client/views/collections/CollectionMenu.tsx index f9b944bb1..7b591e120 100644 --- a/src/client/views/collections/CollectionMenu.tsx +++ b/src/client/views/collections/CollectionMenu.tsx @@ -208,10 +208,10 @@ export class CollectionViewBaseChrome extends React.Component); case CollectionViewType.Freeform: return (); case CollectionViewType.Stacking: return (); case CollectionViewType.Schema: return (); @@ -312,8 +312,8 @@ export class CollectionViewBaseChrome extends React.Component
- {this.props.type === CollectionViewType.Invalid ? (null) : this.viewModes} - {this.templateChrome} + {this.props.type === CollectionViewType.Invalid || this.props.type === CollectionViewType.Docking ? (null) : this.viewModes} + {this.props.type === CollectionViewType.Invalid || this.props.type === CollectionViewType.Docking ? (null) : this.templateChrome}
; } } -- cgit v1.2.3-70-g09d2 From d7a8e8fcf11c435c592381b8073c6fdf3e861974 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Wed, 29 Jul 2020 14:20:03 -0400 Subject: from last --- src/client/views/collections/CollectionMenu.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/client/views/collections/CollectionMenu.tsx') diff --git a/src/client/views/collections/CollectionMenu.tsx b/src/client/views/collections/CollectionMenu.tsx index 7b591e120..47c8addaa 100644 --- a/src/client/views/collections/CollectionMenu.tsx +++ b/src/client/views/collections/CollectionMenu.tsx @@ -211,7 +211,6 @@ export class CollectionViewBaseChrome extends React.Component); case CollectionViewType.Freeform: return (); case CollectionViewType.Stacking: return (); case CollectionViewType.Schema: return (); @@ -219,6 +218,7 @@ export class CollectionViewBaseChrome extends React.Component); case CollectionViewType.Carousel3D: return (); case CollectionViewType.Grid: return (); + case CollectionViewType.Docking: return (); } } private dropDisposer?: DragManager.DragDropDisposer; -- cgit v1.2.3-70-g09d2 From 1a9a9f43210bb848fb511361b43903e07ea70722 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Wed, 29 Jul 2020 14:30:33 -0400 Subject: added divider line for web pae hypothesis switchin --- src/client/views/collections/CollectionMenu.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/client/views/collections/CollectionMenu.tsx') diff --git a/src/client/views/collections/CollectionMenu.tsx b/src/client/views/collections/CollectionMenu.tsx index 47c8addaa..d6cb79e9c 100644 --- a/src/client/views/collections/CollectionMenu.tsx +++ b/src/client/views/collections/CollectionMenu.tsx @@ -541,7 +541,10 @@ export class CollectionFreeFormViewChrome extends React.Component {!this.props.isOverlay ? (null) : - } -- cgit v1.2.3-70-g09d2