| Index: chrome/browser/resources/print_preview/previewarea/margin_control.js
|
| diff --git a/chrome/browser/resources/print_preview/previewarea/margin_control.js b/chrome/browser/resources/print_preview/previewarea/margin_control.js
|
| index f324dc99c53a8a46128ece5d9fadf8cc311bc8b3..72fe4bca8be91b8d1111f6db86d93933cd239ab7 100644
|
| --- a/chrome/browser/resources/print_preview/previewarea/margin_control.js
|
| +++ b/chrome/browser/resources/print_preview/previewarea/margin_control.js
|
| @@ -219,8 +219,7 @@ cr.define('print_preview', function() {
|
| */
|
| setPositionInPts: function(posInPts) {
|
| this.positionInPts_ = posInPts;
|
| - var orientationEnum =
|
| - print_preview.ticket_items.CustomMarginsOrientation;
|
| + var orientationEnum = print_preview.ticket_items.CustomMarginsOrientation;
|
| var x = this.translateTransform_.x;
|
| var y = this.translateTransform_.y;
|
| var width = null, height = null;
|
| @@ -270,8 +269,7 @@ cr.define('print_preview', function() {
|
| */
|
| convertPixelsToPts: function(pixels) {
|
| var pts;
|
| - var orientationEnum =
|
| - print_preview.ticket_items.CustomMarginsOrientation;
|
| + var orientationEnum = print_preview.ticket_items.CustomMarginsOrientation;
|
| if (this.orientation_ == orientationEnum.TOP) {
|
| pts = pixels - this.translateTransform_.y + MarginControl.RADIUS_;
|
| pts /= this.scaleTransform_;
|
| @@ -307,8 +305,8 @@ cr.define('print_preview', function() {
|
|
|
| /** @override */
|
| createDom: function() {
|
| - this.setElementInternal(this.cloneTemplateInternal(
|
| - 'margin-control-template'));
|
| + this.setElementInternal(
|
| + this.cloneTemplateInternal('margin-control-template'));
|
| this.getElement().classList.add('margin-control-' + this.orientation_);
|
| this.textbox_ = this.getElement().getElementsByClassName(
|
| MarginControl.Classes_.TEXTBOX)[0];
|
| @@ -324,12 +322,9 @@ cr.define('print_preview', function() {
|
| this.tracker.add(
|
| this.getElement(), 'mousedown', this.onMouseDown_.bind(this));
|
| this.tracker.add(
|
| - this.getElement(),
|
| - 'transitionend',
|
| - this.onTransitionEnd_.bind(this));
|
| + this.getElement(), 'transitionend', this.onTransitionEnd_.bind(this));
|
| assert(this.textbox_);
|
| - this.tracker.add(
|
| - this.textbox_, 'input', this.onTextboxInput_.bind(this));
|
| + this.tracker.add(this.textbox_, 'input', this.onTextboxInput_.bind(this));
|
| this.tracker.add(
|
| this.textbox_, 'keydown', this.onTextboxKeyDown_.bind(this));
|
| this.tracker.add(
|
| @@ -369,10 +364,9 @@ cr.define('print_preview', function() {
|
| * @private
|
| */
|
| onMouseDown_: function(event) {
|
| - if (!this.textbox_.disabled &&
|
| - event.button == 0 &&
|
| + if (!this.textbox_.disabled && event.button == 0 &&
|
| (event.target == this.getElement() ||
|
| - event.target == this.marginLineEl_)) {
|
| + event.target == this.marginLineEl_)) {
|
| this.mouseStartPositionInPixels_ =
|
| new print_preview.Coordinate2d(event.x, event.y);
|
| this.marginStartPositionInPixels_ = new print_preview.Coordinate2d(
|
| @@ -449,7 +443,5 @@ cr.define('print_preview', function() {
|
| };
|
|
|
| // Export
|
| - return {
|
| - MarginControl: MarginControl
|
| - };
|
| + return {MarginControl: MarginControl};
|
| });
|
|
|