| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 var api = {}; | 5 var api = {}; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Enumeration of scene update commands. | 8 * Enumeration of scene update commands. |
| 9 * @enum {number} | 9 * @enum {number} |
| 10 * @const | 10 * @const |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 * pixelHeight is width and height of the texture to be copied from the web | 315 * pixelHeight is width and height of the texture to be copied from the web |
| 316 * contents. | 316 * contents. |
| 317 * @param {number} pixelX | 317 * @param {number} pixelX |
| 318 * @param {number} pixelY | 318 * @param {number} pixelY |
| 319 * @param {number} pixelWidth | 319 * @param {number} pixelWidth |
| 320 * @param {number} pixelHeight | 320 * @param {number} pixelHeight |
| 321 */ | 321 */ |
| 322 constructor(pixelX, pixelY, pixelWidth, pixelHeight) { | 322 constructor(pixelX, pixelY, pixelWidth, pixelHeight) { |
| 323 super(); | 323 super(); |
| 324 | 324 |
| 325 // Apply defaults to new elements. |
| 326 this.setVisible(true); |
| 327 this.setHitTestable(true); |
| 325 this.setFill(new api.Sprite(pixelX, pixelY, pixelWidth, pixelHeight)); | 328 this.setFill(new api.Sprite(pixelX, pixelY, pixelWidth, pixelHeight)); |
| 326 } | 329 } |
| 327 }; | 330 }; |
| 328 | 331 |
| 329 /** | 332 /** |
| 330 * Enumeration of animatable properties. | 333 * Enumeration of animatable properties. |
| 331 * @enum {number} | 334 * @enum {number} |
| 332 * @const | 335 * @const |
| 333 */ | 336 */ |
| 334 api.Property = { | 337 api.Property = { |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 if ('updateTab' in dict) { | 583 if ('updateTab' in dict) { |
| 581 this.onUpdateTab(dict['updateTabs']); | 584 this.onUpdateTab(dict['updateTabs']); |
| 582 } | 585 } |
| 583 if ('removeTab' in dict) { | 586 if ('removeTab' in dict) { |
| 584 this.onRemoveTab(dict['removeTab']); | 587 this.onRemoveTab(dict['removeTab']); |
| 585 } | 588 } |
| 586 | 589 |
| 587 this.onCommandHandlerFinished() | 590 this.onCommandHandlerFinished() |
| 588 } | 591 } |
| 589 }; | 592 }; |
| OLD | NEW |