Merge "Winscope: apply surface transforms in preview"

This commit is contained in:
Treehugger Robot
2019-06-26 19:01:47 +00:00
committed by Gerrit Code Review
2 changed files with 5 additions and 1 deletions

View File

@@ -64,7 +64,10 @@ export default {
var y = this.s(r.top);
var w = this.s(r.right) - this.s(r.left);
var h = this.s(r.bottom) - this.s(r.top);
return `top: ${y}px; left: ${x}px; height: ${h}px; width: ${w}px`
var t = r.transform;
var tr = t ? `matrix(${t.dsdx}, ${t.dtdx}, ${t.dsdy}, ${t.dtdy}, 0, 0)` : '';
return `top: ${y}px; left: ${x}px; height: ${h}px; width: ${w}px;` +
`transform: ${tr}; transform-origin: 0 0;`
},
onClick(r) {
this.$emit('rect-click', r.ref);

View File

@@ -38,6 +38,7 @@ function transform_layer(layer, {parentHidden}) {
top: pos.y || 0,
bottom: pos.y + size.h || 0,
label: layer.name,
transform: layer.transform,
}
}