The vc line item cannot be moved or resized now

This commit is contained in:
Alejandro Gallardo Escobar 2019-06-24 18:39:40 +02:00
parent e268dfe319
commit 48f4861141
5 changed files with 46 additions and 20 deletions

View File

@ -13,16 +13,16 @@
display: flex;
-webkit-box-orient: initial;
-webkit-box-direction: initial;
-ms-flex-direction: initial;
flex-direction: initial;
-ms-flex-direction: initial;
flex-direction: initial;
justify-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
}
.visual-console-item.is-editing {
@ -60,17 +60,17 @@
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-ms-flex-pack: center;
justify-content: center;
justify-items: center;
-ms-flex-line-pack: center;
align-content: center;
align-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-ms-flex-align: center;
align-items: center;
}
.visual-console-item .digital-clock > span {
@ -100,17 +100,18 @@
.visual-console-item .analogic-clock .hour-hand {
-webkit-animation: rotate-hour 43200s infinite linear;
animation: rotate-hour 43200s infinite linear;
animation: rotate-hour 43200s infinite linear;
}
.visual-console-item .analogic-clock .minute-hand {
-webkit-animation: rotate-minute 3600s infinite linear;
animation: rotate-minute 3600s infinite linear;
animation: rotate-minute 3600s infinite linear;
}
.visual-console-item .analogic-clock .second-hand {
-webkit-animation: rotate-second 60s infinite linear;
animation: rotate-second 60s infinite linear;
animation: rotate-second 60s infinite linear;
}
/*# 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

View File

@ -508,6 +508,15 @@ abstract class VisualConsoleItem<Props extends ItemProps> {
* @param newProps
*/
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;
// Update the internal meta.
this._metadata = newMetadata;

View File

@ -83,10 +83,26 @@ export default class Line extends Item<LineProps> {
...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
* To create the item's DOM representation.