Remove concept of instantiation from OnCanvasTextBox
parent
13fa15e7a9
commit
0891b8748f
|
@ -25,12 +25,8 @@ class OnCanvasTextBox extends OnCanvasObject {
|
|||
};
|
||||
update();
|
||||
$G.on("option-changed", this._on_option_changed = update);
|
||||
}
|
||||
position() {
|
||||
super.position(true);
|
||||
}
|
||||
instantiate() {
|
||||
this.$el.addClass("instantiated").css({
|
||||
|
||||
this.$el.css({
|
||||
cursor: make_css_cursor("move", [8, 8], "move")
|
||||
});
|
||||
this.$el.attr("touch-action", "none");
|
||||
|
@ -97,6 +93,9 @@ class OnCanvasTextBox extends OnCanvasObject {
|
|||
}
|
||||
$fb.applyBounds();
|
||||
}
|
||||
position() {
|
||||
super.position(true);
|
||||
}
|
||||
draw() {
|
||||
const text = this.$editor.val();
|
||||
if (text) {
|
||||
|
|
|
@ -580,7 +580,6 @@ tools = [{
|
|||
pointerup: function(){
|
||||
if (this.rect_width > 1 && this.rect_height > 1) {
|
||||
textbox = new OnCanvasTextBox(this.rect_x, this.rect_y, this.rect_width, this.rect_height);
|
||||
textbox.instantiate();
|
||||
}
|
||||
|
||||
delete this.rect_x;
|
||||
|
|
Loading…
Reference in New Issue