fix font color saving

This commit is contained in:
Reaby committed 2019-03-18 00:03:27 +02:00
1 parent 39f2eb0837
commit 799ede7b76
1 file changed
+9 -1
+9 -1
View File
@@ -340,11 +340,18 @@ function nextSlide(data) {
if (object.type === "i-text") {
var fill = object.get("fill");
if (object.id === "header") {
object.setOptions(bundleData.styleHeader);
} else {
object.setOptions(bundleData.styleText);
}
if (fill != null) {
object.setOptions({fill: fill});
}
object.setShadow({color: "rgba(0,0,0,0.6)", blur: 5, offsetX: 2, offsetY: 2});
object.lockRotation = true;
@@ -648,7 +655,8 @@ function deleteImage(name) {
function changeColor(elem) {
var obj = canvas.getActiveObject();
obj.setColor(window.getComputedStyle(elem).backgroundColor);
console.log(window.getComputedStyle(elem).backgroundColor);
obj.setOptions({fill: window.getComputedStyle(elem).backgroundColor});
canvas.renderAll();
}