Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: tools/cc-frame-viewer/src/quad_view_viewport.js

Issue 12260030: [cc-frame-viewer] Panoply of fixes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixes Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/cc-frame-viewer/src/model.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 'use strict'; 5 'use strict';
6 6
7 base.require('base.range'); 7 base.require('base.range');
8 base.require('ui.event_target'); 8 base.require('ui.event_target');
9 9
10 base.exportTo('ccfv', function() { 10 base.exportTo('ccfv', function() {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 var world_pad; 72 var world_pad;
73 if (opt_dontPadBbox) { 73 if (opt_dontPadBbox) {
74 world_pad = 0; 74 world_pad = 0;
75 } else { 75 } else {
76 world_pad = Math.min(world_rect.width, 76 world_pad = Math.min(world_rect.width,
77 world_rect.height) * 0.10; 77 world_rect.height) * 0.10;
78 } 78 }
79 79
80 world_rect.enlarge(world_pad); 80 world_rect.enlarge(world_pad);
81 this.worldRect = world_rect; 81 this.worldRect = world_rect;
82 this.updateScale_();
82 this.updateTransform_(); 83 this.updateTransform_();
83 this.didChange_(); 84 this.didChange_();
84 }, 85 },
85 86
86 updateTransform_: function() { 87 updateTransform_: function() {
87 if (!this.transformWorldToDevicePixels_) 88 if (!this.transformWorldToDevicePixels_)
88 return; 89 return;
89 90
90 mat2d.identity(this.transformWorldToDevicePixels_); 91 mat2d.identity(this.transformWorldToDevicePixels_);
91 mat2d.translateInplaceXY( 92 mat2d.translateInplaceXY(
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 didChange_: function() { 134 didChange_: function() {
134 base.dispatchSimpleEvent(this, 'change', false, false); 135 base.dispatchSimpleEvent(this, 'change', false, false);
135 } 136 }
136 }; 137 };
137 138
138 return { 139 return {
139 QuadViewViewport: QuadViewViewport, 140 QuadViewViewport: QuadViewViewport,
140 } 141 }
141 }); 142 });
142 143
OLDNEW
« no previous file with comments | « tools/cc-frame-viewer/src/model.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698