-
Notifications
You must be signed in to change notification settings - Fork 36
[FEAT] Render Task #207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEAT] Render Task #207
Changes from all commits
a1417c2
26c6a44
3882378
85c5d7e
e26ee19
dbe8123
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,6 +33,8 @@ export default class StyleConfigurator { | |
| constructor(private graph: mxgraph.mxGraph) {} | ||
|
|
||
| public configureStyles(): void { | ||
| this.mxConstants.RECTANGLE_ROUNDING_FACTOR = 0.1; | ||
|
|
||
| this.configureDefaultVertexStyle(); | ||
| this.configurePoolStyle(); | ||
| this.configureLaneStyle(); | ||
|
|
@@ -125,8 +127,9 @@ export default class StyleConfigurator { | |
| } | ||
|
|
||
| private configureTaskStyle(): void { | ||
| const style = this.mxUtils.clone(this.getStylesheet().getCellStyle(ShapeBpmnElementKind.TASK_USER), this.getDefaultVertexStyle()); | ||
| style[this.mxConstants.STYLE_STROKECOLOR] = '#663399'; | ||
| const style = this.cloneDefaultVertexStyle(); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❓ I guess we will generalize styling for other tasks when implementing rendering for user or service task
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I started the refactoring in the Service Task's PR #208 😉 |
||
| style[this.mxConstants.STYLE_SHAPE] = ShapeBpmnElementKind.TASK; | ||
| style[this.mxConstants.STYLE_VERTICAL_ALIGN] = 'middle'; | ||
| this.putCellStyle(ShapeBpmnElementKind.TASK, style); | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| /** | ||
| * Copyright 2020 Bonitasoft S.A. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| import { MxGraphFactoryService } from '../../../service/MxGraphFactoryService'; | ||
| import { mxgraph } from 'ts-mxgraph'; | ||
| import { StyleConstant } from '../StyleConfigurator'; | ||
|
|
||
| const mxRectangleShape: typeof mxgraph.mxRectangleShape = MxGraphFactoryService.getMxGraphProperty('mxRectangleShape'); | ||
|
|
||
| export class TaskShape extends mxRectangleShape { | ||
| isRounded: boolean; | ||
|
|
||
| protected constructor(bounds: mxgraph.mxRectangle, fill: string, stroke: string, strokewidth: number = StyleConstant.STROKE_WIDTH_THIN) { | ||
| super(bounds, fill, stroke, strokewidth); | ||
|
|
||
| this.isRounded = true; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 nice