Skip to content

Commit

Permalink
Merge pull request #5209 from CodingFabian/text-layer-transform-origin
Browse files Browse the repository at this point in the history
Set transformOrigin for text layer in css.
  • Loading branch information
timvandermeij committed Aug 19, 2014
2 parents 6969ed4 + 1da38ec commit b4fb1e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 0 additions & 1 deletion web/text_layer_builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ var TextLayerBuilder = (function TextLayerBuilderClosure() {
transform = 'rotate(' + rotation + 'deg) ' + transform;
}
CustomStyle.setProp('transform' , textDiv, transform);
CustomStyle.setProp('transformOrigin' , textDiv, '0% 0%');
}
}

Expand Down
14 changes: 8 additions & 6 deletions web/viewer.css
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ html[dir='rtl'] .verticalToolbarSeparator {
}

.horizontalToolbarSeparator {
display: block;
display: block;
margin: 0 0 4px 0;
height: 1px;
width: 100%;
Expand Down Expand Up @@ -1305,8 +1305,6 @@ canvas {
top: 0;
right: 0;
bottom: 0;
color: #000;
font-family: sans-serif;
overflow: hidden;
}

Expand All @@ -1315,6 +1313,11 @@ canvas {
position: absolute;
white-space: pre;
cursor: text;
-webkit-transform-origin: 0% 0%;
-moz-transform-origin: 0% 0%;
-o-transform-origin: 0% 0%;
-ms-transform-origin: 0% 0%;
transform-origin: 0% 0%;
}

.textLayer .highlight {
Expand Down Expand Up @@ -1489,7 +1492,7 @@ canvas {
}

.dialog .separator {
display: block;
display: block;
margin: 4px 0 4px 0;
height: 1px;
width: 100%;
Expand Down Expand Up @@ -1672,7 +1675,7 @@ html[dir='rtl'] #documentPropertiesOverlay .row > * {
background: url(images/[email protected]) no-repeat;
background-size: 7px 16px;
}

html[dir='ltr'] .toolbarButton#sidebarToggle::before {
content: url(images/[email protected]);
}
Expand Down Expand Up @@ -1962,4 +1965,3 @@ html[dir='rtl'] #documentPropertiesOverlay .row > * {
display: none;
}
}

0 comments on commit b4fb1e2

Please sign in to comment.