Commit 3d569f48 authored by bbaer's avatar bbaer
Browse files

Readonly now displays annotations again.

parent ac77d667
Pipeline #2078 passed with stages
in 2 minutes and 43 seconds
......@@ -282,6 +282,9 @@ $(function (n) {
var that = this;
if (viewOnly) {
if (inputField) {
this.outputField = $("#" + inputField);
}
this.getMeta(this.backgroundImage, function(width, height) { that.prepareStaticCanvas(width, height); } );
} else if (editImage) {
this.outputField = $("#" + inputField);
......@@ -400,9 +403,16 @@ $(function (n) {
console.log("prepareStaticCanvas");
var that = this;
this.generateStaticCanvas(width, height);
if (this.fabricJSON) {
this.canvas.loadFromJSON(this.fabricJSON, function() {
that.resizeCanvas(true);
if (this.outputField.val()) {
fabricJSON = this.outputField.val();
} else if (this.fabricJSON) {
fabricJSON = this.fabricJSON;
}
if (fabricJSON) {
this.canvas.loadFromJSON(fabricJSON, function() {
that.firstLoad = true;
that.setBackground();
that.resizeCanvas();
that.canvas.renderAll();
});
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment