chore(drilldown): ensure `#primaryShape` replaces suffix
This commit is contained in:
parent
eefa78240b
commit
cfb3dd4ace
|
@ -1,7 +1,7 @@
|
|||
import { getDi, is } from './ModelUtil';
|
||||
|
||||
|
||||
export var planePostfix = '_plane';
|
||||
export var planeSuffix = '_plane';
|
||||
|
||||
/**
|
||||
* Returns the ID of the plane associated with an element.
|
||||
|
@ -11,7 +11,7 @@ export var planePostfix = '_plane';
|
|||
*/
|
||||
export function planeId(element) {
|
||||
if (is(element, 'bpmn:SubProcess')) {
|
||||
return element.id + planePostfix;
|
||||
return element.id + planeSuffix;
|
||||
}
|
||||
|
||||
return element.id;
|
||||
|
@ -25,7 +25,7 @@ export function planeId(element) {
|
|||
* @returns
|
||||
*/
|
||||
export function asPlaneId(string) {
|
||||
return string + planePostfix;
|
||||
return string + planeSuffix;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -46,5 +46,5 @@ export function isPlane(element) {
|
|||
* @returns {String}
|
||||
*/
|
||||
export function primaryShape(element) {
|
||||
return element.id.replace(planePostfix, '');
|
||||
return element.id.replace(new RegExp(planeSuffix + '$'), '');
|
||||
}
|
Loading…
Reference in New Issue