mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
canvas elements now come with padding, margin, border, and background style resets
This commit is contained in:
@@ -16,6 +16,10 @@
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.element = document.createElement('canvas');
|
||||
this.element.style.padding = '0';
|
||||
this.element.style.margin = '0';
|
||||
this.element.style.border = '0';
|
||||
this.element.style.background = 'transparent';
|
||||
this.context = this.element.getContext('2d');
|
||||
this.setSize(width || 0, height || 0);
|
||||
};
|
||||
|
Reference in New Issue
Block a user