aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/RichTextMenu.tsx
diff options
context:
space:
mode:
authorFawn <fangrui_tong@brown.edu>2020-01-07 07:14:29 -0500
committerFawn <fangrui_tong@brown.edu>2020-01-07 07:14:29 -0500
commite29ba39e74d2d22a74e767c39c30055ebf2ca5e0 (patch)
tree6e7c61d9c94b316e01db636904f3945e1d48d161 /src/client/util/RichTextMenu.tsx
parent4791f95d6be68e590d0a80689d89be4c05e9ffc3 (diff)
styling for brush dropdown
Diffstat (limited to 'src/client/util/RichTextMenu.tsx')
-rw-r--r--src/client/util/RichTextMenu.tsx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/util/RichTextMenu.tsx b/src/client/util/RichTextMenu.tsx
index fa65adca5..ad7b3f2fc 100644
--- a/src/client/util/RichTextMenu.tsx
+++ b/src/client/util/RichTextMenu.tsx
@@ -283,7 +283,7 @@ export default class RichTextMenu extends AntimodeMenu {
// }
// });
- self.view && self.brush_function(self.view.state, self.view.dispatch);
+ self.view && self.fillBrush(self.view.state, self.view.dispatch);
// // update dropdown with marks
// const newBrushDropdowndom = self.createBrushDropdown().render(self.view).dom;
@@ -307,8 +307,8 @@ export default class RichTextMenu extends AntimodeMenu {
<div className="button-dropdown-wrapper">
<button className="antimodeMenu-button" title="" onPointerDown={onClick}>
<FontAwesomeIcon icon="eye-dropper" size="lg" />
- <button className="dropdown-button"><FontAwesomeIcon icon="caret-down" size="sm" /></button>
</button>
+ <button className="dropdown-button antimodeMenu-button"><FontAwesomeIcon icon="caret-down" size="sm" /></button>
<div className="dropdown">
<p>{label}</p>
<button onPointerDown={this.clearBrush}>Clear brush</button>
@@ -320,12 +320,12 @@ export default class RichTextMenu extends AntimodeMenu {
@action
clearBrush() {
- this.brushIsEmpty = true;
- this.brushMarks = new Set();
+ RichTextMenu.Instance.brushIsEmpty = true;
+ RichTextMenu.Instance.brushMarks = new Set();
}
@action
- brush_function(state: EditorState<any>, dispatch: any) {
+ fillBrush(state: EditorState<any>, dispatch: any) {
if (!this.view) return;
if (this.brushIsEmpty) {