mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 17:25:26 +02:00
Merge branch 'ent-4258-visual-console-movement-redimension-mode' of https://brutus.artica.lan:8081/artica/pandorafms into ent-4258-visual-console-movement-redimension-mode
This commit is contained in:
commit
52f762bd5a
@ -113,4 +113,5 @@
|
|||||||
animation: rotate-second 60s infinite linear;
|
animation: rotate-second 60s infinite linear;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*# sourceMappingURL=vc.main.css.map*/
|
/*# sourceMappingURL=vc.main.css.map*/
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -508,6 +508,15 @@ abstract class VisualConsoleItem<Props extends ItemProps> {
|
|||||||
* @param newProps
|
* @param newProps
|
||||||
*/
|
*/
|
||||||
public set meta(newMetadata: ItemMeta) {
|
public set meta(newMetadata: ItemMeta) {
|
||||||
|
this.setMeta(newMetadata);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clasic and protected version of the setter of the `meta` property.
|
||||||
|
* Useful to override it from children classes.
|
||||||
|
* @param newProps
|
||||||
|
*/
|
||||||
|
protected setMeta(newMetadata: ItemMeta) {
|
||||||
const prevMetadata = this._metadata;
|
const prevMetadata = this._metadata;
|
||||||
// Update the internal meta.
|
// Update the internal meta.
|
||||||
this._metadata = newMetadata;
|
this._metadata = newMetadata;
|
||||||
|
@ -53,6 +53,10 @@ export default class ColorCloud extends Item<ColorCloudProps> {
|
|||||||
return container;
|
return container;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected resizeElement(width: number): void {
|
||||||
|
super.resizeElement(width, width);
|
||||||
|
}
|
||||||
|
|
||||||
public createSvgElement(): SVGSVGElement {
|
public createSvgElement(): SVGSVGElement {
|
||||||
const gradientId = `grad_${this.props.id}`;
|
const gradientId = `grad_${this.props.id}`;
|
||||||
// SVG container.
|
// SVG container.
|
||||||
|
@ -83,10 +83,26 @@ export default class Line extends Item<LineProps> {
|
|||||||
...props,
|
...props,
|
||||||
...Line.extractBoxSizeAndPosition(props)
|
...Line.extractBoxSizeAndPosition(props)
|
||||||
},
|
},
|
||||||
meta
|
{
|
||||||
|
...meta,
|
||||||
|
editMode: false
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clasic and protected version of the setter of the `meta` property.
|
||||||
|
* Useful to override it from children classes.
|
||||||
|
* @param newProps
|
||||||
|
* @override Item.setMeta
|
||||||
|
*/
|
||||||
|
public setMeta(newMetadata: ItemMeta) {
|
||||||
|
super.setMeta({
|
||||||
|
...newMetadata,
|
||||||
|
editMode: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @override
|
* @override
|
||||||
* To create the item's DOM representation.
|
* To create the item's DOM representation.
|
||||||
|
@ -652,10 +652,6 @@ export function addResizementListener(
|
|||||||
|
|
||||||
if (width === lastWidth && height === lastHeight) return;
|
if (width === lastWidth && height === lastHeight) return;
|
||||||
|
|
||||||
console.log(
|
|
||||||
width - lastWidth,
|
|
||||||
e.pageX - elementLeft + (lastWidth - mouseElementOffsetX)
|
|
||||||
);
|
|
||||||
if (
|
if (
|
||||||
width < lastWidth &&
|
width < lastWidth &&
|
||||||
e.pageX > elementLeft + (lastWidth - mouseElementOffsetX)
|
e.pageX > elementLeft + (lastWidth - mouseElementOffsetX)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user