mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
36 lines
1.1 KiB
JavaScript
36 lines
1.1 KiB
JavaScript
|
// Generated by CoffeeScript 1.3.1
|
||
|
(function() {
|
||
|
|
||
|
$(document).ready(function() {
|
||
|
var Piskel;
|
||
|
Piskel = Em.Application.create();
|
||
|
Piskel.mainView = Em.View.create({
|
||
|
templateName: 'main',
|
||
|
onCanvasClick: function() {}
|
||
|
});
|
||
|
Piskel.mainView.append;
|
||
|
Piskel.Art = Ember.Object.extend({
|
||
|
setContext: function(context) {
|
||
|
this.context = context;
|
||
|
},
|
||
|
clear: function() {
|
||
|
this.context.save();
|
||
|
return this.context.clearRect(0, 0, this.context.canvas.width, this.context.canvas.height);
|
||
|
}
|
||
|
});
|
||
|
$('#main').ready(function() {
|
||
|
var context, mainCanvas;
|
||
|
mainCanvas = document.getElementById('main');
|
||
|
context = mainCanvas.getContext('2d');
|
||
|
context.save();
|
||
|
context.clearRect(0, 0, context.canvas.width, context.canvas.height);
|
||
|
context.fillStyle = 'white';
|
||
|
context.fillRect(0, 0, context.canvas.width, context.canvas.height);
|
||
|
context.restore();
|
||
|
return Piskel.mainCanvas = document.getElementById('main');
|
||
|
});
|
||
|
return window.Piskel = Piskel;
|
||
|
});
|
||
|
|
||
|
}).call(this);
|