barve, shranjevanje
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
class Note{
|
||||
constructor(id, divCanvas, x, y, width, height, content) {
|
||||
constructor(id, divCanvas, x, y, width, height, content, colorClass, zindex) {
|
||||
this.id = id;
|
||||
this.divCanvas = divCanvas;
|
||||
this.x = x;
|
||||
@@ -8,6 +8,8 @@ class Note{
|
||||
this.height = height;
|
||||
this.element = null;
|
||||
this.content = content;
|
||||
this.colorClass = colorClass;
|
||||
this.zindex = zindex;
|
||||
}
|
||||
|
||||
refresh(){
|
||||
@@ -16,7 +18,7 @@ class Note{
|
||||
}
|
||||
|
||||
this.element = $(`
|
||||
<div class="card div-note" data-id="${this.id}">
|
||||
<div class="card div-note ${this.colorClass}" data-id="${this.id}">
|
||||
<div class="card-body">
|
||||
${this.content}
|
||||
</div>
|
||||
@@ -40,7 +42,8 @@ class Note{
|
||||
this.element.css({
|
||||
'width': this.width + 'px',
|
||||
'height': this.height + 'px',
|
||||
'position': 'relative'
|
||||
'position': 'relative',
|
||||
'z-index': this.zindex
|
||||
});
|
||||
this.element.on( "dblclick", function() {
|
||||
openModalEditNote(parseInt($(this).attr('data-id')));
|
||||
|
||||
Reference in New Issue
Block a user