diff options
author | eleanor-park <eleanor_park@brown.edu> | 2024-12-04 23:03:22 -0500 |
---|---|---|
committer | eleanor-park <eleanor_park@brown.edu> | 2024-12-04 23:03:22 -0500 |
commit | b33ffac90703834a4d0c9255aa25702aafe3dfda (patch) | |
tree | 396952a2a006dd04079dc0075cbfdeea15a8c64e /src/client/views/MainView.tsx | |
parent | 2577ff5a88be04a840c4ac55360265b35d08fe19 (diff) | |
parent | 2fee49a7cd342331633bf39d1ac837838d252a18 (diff) |
Merge branch 'master' into eleanor-gptdraw
Diffstat (limited to 'src/client/views/MainView.tsx')
-rw-r--r-- | src/client/views/MainView.tsx | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index 7bc211036..cd6b97255 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -8,7 +8,7 @@ import { observer } from 'mobx-react'; import * as React from 'react'; import ResizeObserver from 'resize-observer-polyfill'; import '../../../node_modules/browndash-components/dist/styles/global.min.css'; -import { ClientUtils, lightOrDark, returnEmptyFilter, returnFalse, returnTrue, returnZero, setupMoveUpEvents } from '../../ClientUtils'; +import { ClientUtils, returnEmptyFilter, returnFalse, returnTrue, returnZero, setupMoveUpEvents } from '../../ClientUtils'; import { emptyFunction } from '../../Utils'; import { Doc, DocListCast, GetDocFromUrl, Opt, returnEmptyDoclist } from '../../fields/Doc'; import { DocData } from '../../fields/DocSymbols'; @@ -1024,10 +1024,36 @@ export class MainView extends ObservableReactComponent<object> { <svg style={{ width: '100%', height: '100%' }}> {[ ...SnappingManager.HorizSnapLines.map(l => ( - <line key={'horiz' + l} x1="0" y1={l} x2="2000" y2={l} stroke={lightOrDark(StrCast(dragPar.layoutDoc.backgroundColor, 'gray'))} opacity={0.3} strokeWidth={1} strokeDasharray="2 2" /> + <line + key={'horiz' + l} + x1="0" + y1={l} + x2="2000" + y2={l} + stroke={ + SnappingManager.userVariantColor + /* lightOrDark(StrCast(dragPar.layoutDoc.backgroundColor, 'gray'))*/ + } + opacity={0.3} + strokeWidth={3} + strokeDasharray="2 2" + /> )), ...SnappingManager.VertSnapLines.map(l => ( - <line key={'vert' + l} y1={this.topOfMainDocContent.toString()} x1={l} y2="2000" x2={l} stroke={lightOrDark(StrCast(dragPar.layoutDoc.backgroundColor, 'gray'))} opacity={0.3} strokeWidth={1} strokeDasharray="2 2" /> + <line + key={'vert' + l} + y1={this.topOfMainDocContent.toString()} + x1={l} + y2="2000" + x2={l} + stroke={ + SnappingManager.userVariantColor + /* lightOrDark(StrCast(dragPar.layoutDoc.backgroundColor, 'gray'))*/ + } + opacity={0.3} + strokeWidth={3} + strokeDasharray="2 2" + /> )), ]} </svg> |