diff options
author | Melissa Zhang <mzhang19096@gmail.com> | 2020-04-26 12:18:10 -0700 |
---|---|---|
committer | Melissa Zhang <mzhang19096@gmail.com> | 2020-04-26 12:18:10 -0700 |
commit | fbd1f11cbd1aef4ea5fefa868662a66ab41ba62b (patch) | |
tree | a0c8bc84d87e18784339238e961e9d5203338f4c | |
parent | 88f14beadcf633c303d2fba97516c3b4efe6b4ee (diff) |
set new icon
-rw-r--r-- | src/client/views/MainView.tsx | 3 | ||||
-rw-r--r-- | src/client/views/nodes/ComparisonBox.scss | 2 | ||||
-rw-r--r-- | src/client/views/nodes/ComparisonBox.tsx | 6 | ||||
-rw-r--r-- | src/server/authentication/models/current_user_utils.ts | 2 |
4 files changed, 6 insertions, 7 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index 8fb67c435..da60549ab 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -1,5 +1,5 @@ import { library } from '@fortawesome/fontawesome-svg-core'; -import { faTerminal, faCalculator, faWindowMaximize, faAddressCard, faQuestionCircle, faArrowDown, faArrowUp, faBolt, faBullseye, faCaretUp, faCat, faCheck, faChevronRight, faClipboard, faClone, faCloudUploadAlt, faCommentAlt, faCompressArrowsAlt, faCut, faEllipsisV, faEraser, faExclamation, faFileAlt, faFileAudio, faFilePdf, faFilm, faFilter, faFont, faGlobeAsia, faHighlighter, faLongArrowAltRight, faMicrophone, faMousePointer, faMusic, faObjectGroup, faPause, faPen, faPenNib, faPhone, faPlay, faPortrait, faRedoAlt, faStamp, faStickyNote, faThumbtack, faTree, faTv, faUndoAlt, faVideo } from '@fortawesome/free-solid-svg-icons'; +import { faColumns, faTerminal, faCalculator, faWindowMaximize, faAddressCard, faQuestionCircle, faArrowDown, faArrowUp, faBolt, faBullseye, faCaretUp, faCat, faCheck, faChevronRight, faClipboard, faClone, faCloudUploadAlt, faCommentAlt, faCompressArrowsAlt, faCut, faEllipsisV, faEraser, faExclamation, faFileAlt, faFileAudio, faFilePdf, faFilm, faFilter, faFont, faGlobeAsia, faHighlighter, faLongArrowAltRight, faMicrophone, faMousePointer, faMusic, faObjectGroup, faPause, faPen, faPenNib, faPhone, faPlay, faPortrait, faRedoAlt, faStamp, faStickyNote, faThumbtack, faTree, faTv, faUndoAlt, faVideo } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { action, computed, configure, observable, reaction, runInAction } from 'mobx'; import { observer } from 'mobx-react'; @@ -102,6 +102,7 @@ export class MainView extends React.Component { } } + library.add(faColumns); library.add(faTerminal); library.add(faCalculator); library.add(faWindowMaximize); diff --git a/src/client/views/nodes/ComparisonBox.scss b/src/client/views/nodes/ComparisonBox.scss index 74e80236d..5449cd145 100644 --- a/src/client/views/nodes/ComparisonBox.scss +++ b/src/client/views/nodes/ComparisonBox.scss @@ -36,7 +36,7 @@ right: 0; height: 100%; width: 100%; - overflow: auto; + overflow: hidden; background-color: rgb(200, 200, 200); } diff --git a/src/client/views/nodes/ComparisonBox.tsx b/src/client/views/nodes/ComparisonBox.tsx index 6ca0397e2..09590aff7 100644 --- a/src/client/views/nodes/ComparisonBox.tsx +++ b/src/client/views/nodes/ComparisonBox.tsx @@ -60,8 +60,7 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<FieldViewProps, C window.addEventListener("pointerup", this.onPointerUp); } - private resizeUpdater: Lambda = () => { }; - + private resizeUpdater: Lambda | undefined; componentWillMount() { this.props.Document.clipWidth = this.props.PanelWidth() / 2; @@ -72,11 +71,10 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<FieldViewProps, C } componentWillUnmount() { - this.resizeUpdater(); + if (this.resizeUpdater) this.resizeUpdater(); } private onPointerMove = ({ movementX }: PointerEvent) => { - //is it ok to use NumCast const width = movementX * this.props.ScreenToLocalTransform().Scale + NumCast(this.props.Document.clipWidth); if (width && width > 5 && width < this.props.PanelWidth()) { this.props.Document.clipWidth = width; diff --git a/src/server/authentication/models/current_user_utils.ts b/src/server/authentication/models/current_user_utils.ts index 4cddbb347..54e20f3c5 100644 --- a/src/server/authentication/models/current_user_utils.ts +++ b/src/server/authentication/models/current_user_utils.ts @@ -189,7 +189,7 @@ export class CurrentUserUtils { { _nativeWidth: undefined, _nativeHeight: undefined, _LODdisable: true, _width: 150, _height: 100, title: "freeform" }); } return [ - { title: "Drag a comparison box", label: "Comparison", icon: "cat", ignoreClick: true, drag: 'Docs.Create.ComparisonDocument()' }, + { title: "Drag a comparison box", label: "Comp", icon: "columns", ignoreClick: true, drag: 'Docs.Create.ComparisonDocument()' }, { title: "Drag a collection", label: "Col", icon: "folder", click: 'openOnRight(getCopy(this.dragFactory, true))', drag: 'getCopy(this.dragFactory, true)', dragFactory: doc.emptyCollection as Doc }, { title: "Drag a web page", label: "Web", icon: "globe-asia", ignoreClick: true, drag: 'Docs.Create.WebDocument("", { title: "New Webpage" })' }, { title: "Drag a cat image", label: "Img", icon: "cat", ignoreClick: true, drag: 'Docs.Create.ImageDocument("https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/1200px-Cat03.jpg", { _width: 250, _nativeWidth:250, title: "an image of a cat" })' }, |