@@ -18,7 +18,7 @@ import type { BpmnGraph } from '../BpmnGraph';
1818import type { Stylesheet , CellStateStyle } from '@maxgraph/core' ;
1919
2020import { AssociationDirectionKind , FlowKind , SequenceFlowKind , ShapeBpmnElementKind , ShapeUtil } from '../../../model/bpmn/internal' ;
21- import { mxConstants , mxPerimeter } from '../initializer ' ;
21+ import { constants , Perimeter } from '@maxgraph/core ' ;
2222import { BpmnStyleIdentifier , MarkerIdentifier , StyleDefault } from '../style' ;
2323
2424const arrowDefaultSize = 12 ;
@@ -171,7 +171,7 @@ export class StyleConfigurator {
171171 // label style
172172 style . verticalAlign = 'middle' ;
173173 style . align = 'center' ;
174- style [ mxConstants . STYLE_SWIMLANE_LINE ] = 0 ; // hide the line between the title region and the content area
174+ style [ constants . STYLE_SWIMLANE_LINE ] = 0 ; // hide the line between the title region and the content area
175175 style . startSize = StyleDefault . LANE_LABEL_SIZE ;
176176 style . fillColor = StyleDefault . LANE_LABEL_FILL_COLOR ;
177177
@@ -182,9 +182,9 @@ export class StyleConfigurator {
182182 for ( const kind of ShapeUtil . eventKinds ( ) ) {
183183 const style : CellStateStyle = { } ;
184184 style . shape = kind ;
185- style [ mxConstants . STYLE_PERIMETER ] = mxPerimeter . EllipsePerimeter ;
186- style [ mxConstants . STYLE_STROKEWIDTH ] = kind == ShapeBpmnElementKind . EVENT_END ? StyleDefault . STROKE_WIDTH_THICK : StyleDefault . STROKE_WIDTH_THIN ;
187- style [ mxConstants . STYLE_VERTICAL_LABEL_POSITION ] = mxConstants . ALIGN_BOTTOM ;
185+ style [ constants . STYLE_PERIMETER ] = Perimeter . EllipsePerimeter ;
186+ style [ constants . STYLE_STROKEWIDTH ] = kind == ShapeBpmnElementKind . EVENT_END ? StyleDefault . STROKE_WIDTH_THICK : StyleDefault . STROKE_WIDTH_THIN ;
187+ style [ constants . STYLE_VERTICAL_LABEL_POSITION ] = constants . ALIGN_BOTTOM ;
188188 this . putCellStyle ( kind , style ) ;
189189 }
190190 }
@@ -193,23 +193,23 @@ export class StyleConfigurator {
193193 const style : CellStateStyle = { } ;
194194 style . shape = ShapeBpmnElementKind . TEXT_ANNOTATION ;
195195 style . verticalAlign = 'middle' ;
196- style . align = mxConstants . ALIGN_LEFT ;
197- style [ mxConstants . STYLE_SPACING_LEFT ] = 5 ;
196+ style . align = constants . ALIGN_LEFT ;
197+ style [ constants . STYLE_SPACING_LEFT ] = 5 ;
198198 style . fillColor = StyleDefault . TEXT_ANNOTATION_FILL_COLOR ;
199- style [ mxConstants . STYLE_STROKEWIDTH ] = StyleDefault . STROKE_WIDTH_THIN ;
199+ style [ constants . STYLE_STROKEWIDTH ] = StyleDefault . STROKE_WIDTH_THIN ;
200200 this . putCellStyle ( ShapeBpmnElementKind . TEXT_ANNOTATION , style ) ;
201201 }
202202
203203 private configureGroupStyle ( ) : void {
204204 const style : CellStateStyle = { } ;
205- style [ mxConstants . STYLE_ROUNDED ] = true ;
205+ style [ constants . STYLE_ROUNDED ] = true ;
206206 style . dashed = true ;
207207 style . dashPattern = '7 4 1 4' ;
208- style [ mxConstants . STYLE_STROKEWIDTH ] = StyleDefault . STROKE_WIDTH_THIN ;
208+ style [ constants . STYLE_STROKEWIDTH ] = StyleDefault . STROKE_WIDTH_THIN ;
209209 style . fillColor = StyleDefault . GROUP_FILL_COLOR ;
210210 // Default label positioning
211211 style . align = 'center' ;
212- style . verticalAlign = mxConstants . ALIGN_TOP ;
212+ style . verticalAlign = constants . ALIGN_TOP ;
213213
214214 this . putCellStyle ( ShapeBpmnElementKind . GROUP , style ) ;
215215 }
@@ -218,9 +218,9 @@ export class StyleConfigurator {
218218 for ( const kind of ShapeUtil . activityKinds ( ) ) {
219219 const style : CellStateStyle = { } ;
220220 style . shape = kind ;
221- style [ mxConstants . STYLE_ROUNDED ] = true ; // required by the BPMN specification
221+ style [ constants . STYLE_ROUNDED ] = true ; // required by the BPMN specification
222222 style . verticalAlign = 'middle' ;
223- style [ mxConstants . STYLE_STROKEWIDTH ] = kind == ShapeBpmnElementKind . CALL_ACTIVITY ? StyleDefault . STROKE_WIDTH_THICK : StyleDefault . STROKE_WIDTH_THIN ;
223+ style [ constants . STYLE_STROKEWIDTH ] = kind == ShapeBpmnElementKind . CALL_ACTIVITY ? StyleDefault . STROKE_WIDTH_THICK : StyleDefault . STROKE_WIDTH_THIN ;
224224 this . putCellStyle ( kind , style ) ;
225225 }
226226 }
@@ -229,13 +229,13 @@ export class StyleConfigurator {
229229 for ( const kind of ShapeUtil . gatewayKinds ( ) ) {
230230 const style : CellStateStyle = { } ;
231231 style . shape = kind ;
232- style [ mxConstants . STYLE_PERIMETER ] = mxPerimeter . RhombusPerimeter ;
233- style [ mxConstants . STYLE_STROKEWIDTH ] = StyleDefault . STROKE_WIDTH_THIN ;
234- style . verticalAlign = mxConstants . ALIGN_TOP ;
232+ style [ constants . STYLE_PERIMETER ] = Perimeter . RhombusPerimeter ;
233+ style [ constants . STYLE_STROKEWIDTH ] = StyleDefault . STROKE_WIDTH_THIN ;
234+ style . verticalAlign = constants . ALIGN_TOP ;
235235
236236 // Default label positioning
237- style [ mxConstants . STYLE_LABEL_POSITION ] = mxConstants . ALIGN_LEFT ;
238- style [ mxConstants . STYLE_VERTICAL_LABEL_POSITION ] = mxConstants . ALIGN_TOP ;
237+ style [ constants . STYLE_LABEL_POSITION ] = constants . ALIGN_LEFT ;
238+ style [ constants . STYLE_VERTICAL_LABEL_POSITION ] = constants . ALIGN_TOP ;
239239
240240 this . putCellStyle ( kind , style ) ;
241241 }
@@ -247,10 +247,10 @@ export class StyleConfigurator {
247247
248248 style . shape = BpmnStyleIdentifier . EDGE ;
249249 style . endSize = arrowDefaultSize ;
250- style [ mxConstants . STYLE_STROKEWIDTH ] = 1.5 ;
251- style [ mxConstants . STYLE_ROUNDED ] = true ;
250+ style [ constants . STYLE_STROKEWIDTH ] = 1.5 ;
251+ style [ constants . STYLE_ROUNDED ] = true ;
252252 style . arcSize = 5 ;
253- style . verticalAlign = mxConstants . ALIGN_BOTTOM ;
253+ style . verticalAlign = constants . ALIGN_BOTTOM ;
254254
255255 // The end arrow must be redefined in specific style
256256 delete style . endArrow ;
@@ -272,13 +272,13 @@ export class StyleConfigurator {
272272}
273273
274274function configureCommonDefaultStyle ( style : CellStateStyle ) : void {
275- style [ mxConstants . STYLE_FONTFAMILY ] = StyleDefault . DEFAULT_FONT_FAMILY ;
276- style [ mxConstants . STYLE_FONTSIZE ] = StyleDefault . DEFAULT_FONT_SIZE ;
277- style [ mxConstants . STYLE_FONTCOLOR ] = StyleDefault . DEFAULT_FONT_COLOR ;
275+ style [ constants . STYLE_FONTFAMILY ] = StyleDefault . DEFAULT_FONT_FAMILY ;
276+ style [ constants . STYLE_FONTSIZE ] = StyleDefault . DEFAULT_FONT_SIZE ;
277+ style [ constants . STYLE_FONTCOLOR ] = StyleDefault . DEFAULT_FONT_COLOR ;
278278 style . fillColor = StyleDefault . DEFAULT_FILL_COLOR ;
279- style [ mxConstants . STYLE_STROKECOLOR ] = StyleDefault . DEFAULT_STROKE_COLOR ;
280- style [ mxConstants . STYLE_LABEL_BACKGROUNDCOLOR ] = mxConstants . NONE ;
279+ style [ constants . STYLE_STROKECOLOR ] = StyleDefault . DEFAULT_STROKE_COLOR ;
280+ style [ constants . STYLE_LABEL_BACKGROUNDCOLOR ] = constants . NONE ;
281281
282282 // only works with html labels (enabled by GraphConfigurator)
283- style [ mxConstants . STYLE_WHITE_SPACE ] = 'wrap' ;
283+ style [ constants . STYLE_WHITE_SPACE ] = 'wrap' ;
284284}
0 commit comments