aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoranika-ahluwalia <anika.ahluwalia@gmail.com>2020-08-06 11:21:33 -0500
committeranika-ahluwalia <anika.ahluwalia@gmail.com>2020-08-06 11:21:33 -0500
commitecadf91fa662a45b7e0c2302f9423a2032589909 (patch)
tree26b056d00ad20c64b9d4b6ceab9b6ef16405061d
parente1ad098f0756f7a11d4a43bdc47499c8cb4b0842 (diff)
ink fix
-rw-r--r--src/client/util/SettingsManager.tsx2
-rw-r--r--src/client/views/collections/collectionFreeForm/PropertiesView.tsx37
2 files changed, 24 insertions, 15 deletions
diff --git a/src/client/util/SettingsManager.tsx b/src/client/util/SettingsManager.tsx
index 155c7f60c..8124b7676 100644
--- a/src/client/util/SettingsManager.tsx
+++ b/src/client/util/SettingsManager.tsx
@@ -257,7 +257,7 @@ export default class SettingsManager extends React.Component<{}> {
</option>;
})}
</select>
- </div>;
+ </div>
</div>;
return preferencesContent;
diff --git a/src/client/views/collections/collectionFreeForm/PropertiesView.tsx b/src/client/views/collections/collectionFreeForm/PropertiesView.tsx
index 3b449d941..8aeb80ace 100644
--- a/src/client/views/collections/collectionFreeForm/PropertiesView.tsx
+++ b/src/client/views/collections/collectionFreeForm/PropertiesView.tsx
@@ -83,6 +83,8 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
@computed get isInk() { return this.selectedDoc?.type === DocumentType.INK; }
+ @observable scrolling: boolean = true;
+
@action
rtfWidth = () => {
if (this.selectedDoc) {
@@ -598,21 +600,28 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
set colorStk(value) { value && (this._lastLine = value); this.selectedDoc && (this.selectedDoc.color = value ? value : undefined); }
colorButton(value: string, type: string, setter: () => {}) {
- return <div className="properties-flyout">
- <Flyout anchorPoint={anchorPoints.LEFT_TOP}
- content={type === "fill" ? this.fillPicker : this.linePicker}>
- <div className="color-button" key="color" onPointerDown={undoBatch(action(e => setter()))}>
- <div className="color-button-preview" style={{
- backgroundColor: value ?? "121212", width: 15, height: 15,
- display: value === "" || value === "transparent" ? "none" : ""
- }} />
- {value === "" || value === "transparent" ? <p style={{ fontSize: 25, color: "red", marginTop: -14, position: "fixed" }}>☒</p> : ""}
- </div>
- </Flyout>
+ // return <div className="properties-flyout" onPointerEnter={e => this.changeScrolling(false)}
+ // onPointerLeave={e => this.changeScrolling(true)}>
+ // <Flyout anchorPoint={anchorPoints.LEFT_TOP}
+ // content={type === "fill" ? this.fillPicker : this.linePicker}>
+ return <div className="color-button" key="color" onPointerDown={undoBatch(action(e => setter()))}>
+ <div className="color-button-preview" style={{
+ backgroundColor: value ?? "121212", width: 15, height: 15,
+ display: value === "" || value === "transparent" ? "none" : ""
+ }} />
+ {value === "" || value === "transparent" ? <p style={{ fontSize: 25, color: "red", marginTop: -14 }}>☒</p> : ""}
</div>;
+ // </Flyout>
+ // </div>;
}
+ @action
+ changeScrolling = (scroll: boolean) => {
+ console.log(scroll);
+ this.scrolling = scroll;
+ }
+
@undoBatch
@action
switchStk = (color: ColorState) => {
@@ -654,8 +663,8 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
<div className="stroke-button">{this.lineButton}</div>
</div>
</div>
- {/* {this._fillBtn ? this.fillPicker : ""}
- {this._lineBtn ? this.linePicker : ""} */}
+ {this._fillBtn ? this.fillPicker : ""}
+ {this._lineBtn ? this.linePicker : ""}
</div>;
}
@@ -771,7 +780,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
if (this.selectedDoc && !this.isPres) {
return <div className="propertiesView" style={{
width: this.props.width,
- // overflowY: this.inActions ? "visible" : "scroll"
+ overflowY: this.scrolling ? "scroll" : "visible"
}} >
<div className="propertiesView-title" style={{ width: this.props.width }}>
Properties