@@ -20,11 +20,20 @@ import {
2020 mxCodec ,
2121 mxGraphModel ,
2222} from "../../core/mxgraph" ;
23- import { Graph , HoverIcons } from "./Graph" ;
23+ import { Graph } from "./Graph" ;
2424import { Editor , Dialog } from "./Editor" ;
2525import { getStencil } from "../stencils" ;
2626import Gear_128x128 from "../stencils/clipart/Gear_128x128" ;
2727import { collapsedImage , expandedImage , searchImage } from "../images/base64" ;
28+ import {
29+ REFRESH_TARGET_IMAGE ,
30+ ROUND_DROP_IMAGE ,
31+ TRIANGLE_DOWN_IMAGE ,
32+ TRIANGLE_LEFT_IMAGE ,
33+ TRIANGLE_RIGHT_IMAGE ,
34+ TRIANGLE_UP_IMAGE ,
35+ } from "../utils/graph" ;
36+ import { GRAPH } from "../utils/constant" ;
2837
2938export { Sidebar } ;
3039
@@ -115,6 +124,13 @@ function Sidebar(editorUi, container) {
115124 this . init ( ) ;
116125}
117126
127+ Sidebar . prototype . triangleUp = TRIANGLE_UP_IMAGE ;
128+ Sidebar . prototype . triangleRight = TRIANGLE_RIGHT_IMAGE ;
129+ Sidebar . prototype . triangleDown = TRIANGLE_DOWN_IMAGE ;
130+ Sidebar . prototype . triangleLeft = TRIANGLE_LEFT_IMAGE ;
131+ Sidebar . prototype . refreshTarget = REFRESH_TARGET_IMAGE ;
132+ Sidebar . prototype . roundDrop = ROUND_DROP_IMAGE ;
133+
118134/**
119135 * Adds all palettes to the sidebar.
120136 */
@@ -4386,7 +4402,7 @@ Sidebar.prototype.createDragSource = function (elt, dropHandler, preview, cells,
43864402 arrow . setAttribute ( "title" , tooltip ) ;
43874403 }
43884404
4389- mxUtils . setOpacity ( arrow , img == HoverIcons . prototype . refreshTarget ? 30 : 20 ) ;
4405+ mxUtils . setOpacity ( arrow , img == REFRESH_TARGET_IMAGE ? 30 : 20 ) ;
43904406 arrow . style . position = "absolute" ;
43914407 arrow . style . cursor = "crosshair" ;
43924408
@@ -4724,7 +4740,7 @@ Sidebar.prototype.createDragSource = function (elt, dropHandler, preview, cells,
47244740 }
47254741
47264742 bds . grow ( this . graph . tolerance ) ;
4727- bds . grow ( HoverIcons . prototype . arrowSpacing ) ;
4743+ bds . grow ( GRAPH . ARROW_SPACING ) ;
47284744
47294745 var handler = this . graph . selectionCellsHandler . getHandler ( currentTargetState . cell ) ;
47304746
@@ -4878,7 +4894,7 @@ Sidebar.prototype.createDragSource = function (elt, dropHandler, preview, cells,
48784894 }
48794895
48804896 bds . grow ( this . graph . tolerance ) ;
4881- bds . grow ( HoverIcons . prototype . arrowSpacing ) ;
4897+ bds . grow ( GRAPH . ARROW_SPACING ) ;
48824898
48834899 var handler = this . graph . selectionCellsHandler . getHandler ( state . cell ) ;
48844900
0 commit comments