resize elements from center point (#1225)

* add hint & support multi-line hints

* resize from center point using the new resize maths

* resize with origin element when lifting alt key

* add readonly to elementOriginPosition

* add setResizeWithCenterKeyLifted

* isResizeFromCenter logic

* offsetX and offsetY

* simplify equations

* creating element from center point

* lint

* lint

* lint

* remove revert on key up logic

Co-authored-by: dwelle <luzar.david@gmail.com>
Co-authored-by: daishi <daishi@axlight.com>
This commit is contained in:
José Quinto 2020-04-22 16:57:17 +01:00 committed by GitHub
parent 8c49770e3b
commit ed6fb60337
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 69 additions and 22 deletions

View file

@ -8,11 +8,12 @@
position: absolute;
top: 54px;
transform: translateX(calc(-50% - 16px)); /* 16px is half of lock icon */
white-space: pre;
text-align: center;
@media #{$media-query} {
position: static;
transform: none;
margin-top: 0.5rem;
text-align: center;
}
> span {