Skip to content

Commit

Permalink
test(transform): optimize css baseline in origin test
Browse files Browse the repository at this point in the history
  • Loading branch information
pissang committed May 14, 2021
1 parent c042a3f commit b41f39b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/origin.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#css-baseline-container>div {
position: absolute;
border: 2px solid red;
box-sizing: border-box;
}
#description {
position: absolute;
Expand Down Expand Up @@ -138,11 +139,9 @@
baselineContainer.appendChild(baselineBox);
// rotation and skewY in zrender has different direction with CSS transform.
baselineBox.style.cssText = `
left: ${offsetX + cellSize * column}px;
top: ${offsetY + row * cellSize}px;
width: ${elSize}px;
height: ${elSize}px;
transform: rotate(${-rot}deg) skew(${skew[0]}deg, ${-skew[1]}deg) scale(${scale[0]}, ${scale[1]});
transform: translate(${offsetX + cellSize * column}px, ${offsetY + row * cellSize}px) rotate(${-rot}deg) skew(${skew[0]}deg, ${-skew[1]}deg) scale(${scale[0]}, ${scale[1]});
transform-origin: ${origin[0] * 100}% ${origin[1] * 100}%;
`

Expand Down

0 comments on commit b41f39b

Please sign in to comment.