aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/collections/collectionSchema/CollectionSchemaView.tsx13
-rw-r--r--src/client/views/collections/collectionSchema/SchemaTableCell.tsx2
2 files changed, 9 insertions, 6 deletions
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
index d3259d42e..bcb94e10d 100644
--- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
+++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
@@ -73,11 +73,8 @@ export class CollectionSchemaView extends CollectionSubView() {
constructor(props: any) {
super(props);
makeObservable(this);
- const lightenedColor = (r: number, g: number, b:number) => {
- const lightened = ClientUtils.lightenRGB(r, g, b, 165);
- return {r: lightened[0], g: lightened[1], b: lightened[2]}
- }
- const colors = (r: number, g: number, b: number): [any, any] => {return [{r: r, g: g, b: b}, lightenedColor(r, g, b)]}
+ const lightenedColor = (r: number, g: number, b:number) => { const lightened = ClientUtils.lightenRGB(r, g, b, 165); return {r: lightened[0], g: lightened[1], b: lightened[2]}} // prettier-ignore
+ const colors = (r: number, g: number, b: number): [any, any] => {return [{r: r, g: g, b: b}, lightenedColor(r, g, b)]} // prettier-ignore
this._eqHighlightColors.push(colors(70, 150, 50));
this._eqHighlightColors.push(colors(180, 70, 20));
this._eqHighlightColors.push(colors(70, 50, 150));
@@ -602,7 +599,11 @@ export class CollectionSchemaView extends CollectionSubView() {
}
removeCellHighlights = () => {
- this.highlightedCells.forEach(cell => {cell.style.border = ''; cell.style.backgroundColor = '';});
+ this._highlightedCellsInfo.forEach(info => {
+ const doc = info[0];
+ const cell = this.getCellElement(doc, info[1]);
+ if (!this._selectedDocs.includes(doc)) cell.style.border = '';
+ cell.style.backgroundColor = '';});
this._highlightedCellsInfo = [];
}
diff --git a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx
index 084306c4a..1f5684151 100644
--- a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx
+++ b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx
@@ -266,6 +266,8 @@ export class SchemaTableCell extends ObservableReactComponent<SchemaTableCellPro
className="schema-table-cell"
onContextMenu={e => StopEvent(e)}
onPointerDown={action(e => {
+ if (this.lockedInteraction) { e.stopPropagation(); e.preventDefault(); return; }
+
if (this._props.refSelectModeInfo.enabled && !selectedCell(this._props)){
e.stopPropagation();
e.preventDefault();