* @private
()
| 234 | * @private |
| 235 | */ |
| 236 | _initialize() { |
| 237 | // Before init plugin notification |
| 238 | this.notifyPlugins('beforeInit'); |
| 239 | |
| 240 | if (this.options.responsive) { |
| 241 | this.resize(); |
| 242 | } else { |
| 243 | retinaScale(this, this.options.devicePixelRatio); |
| 244 | } |
| 245 | |
| 246 | this.bindEvents(); |
| 247 | |
| 248 | // After init plugin notification |
| 249 | this.notifyPlugins('afterInit'); |
| 250 | |
| 251 | return this; |
| 252 | } |
| 253 | |
| 254 | clear() { |
| 255 | clearCanvas(this.canvas, this.ctx); |
no test coverage detected