Commit 6079568b authored by bbaer's avatar bbaer
Browse files

added parameter to define any starting color

parent c0437e3e
Pipeline #1029 passed with stage
in 1 minute and 54 seconds
......@@ -271,6 +271,10 @@ $(function (n) {
this.generateControls();
this.getMeta(this.backgroundImage, function(width, height) { that.prepareCanvas(width, height);});
}
var defaultColor = $fabricElement.data('fabric-color') || false;
if (defaultColor) {
this.setColor(defaultColor);
}
};
n.Fabric.prototype.generateControls = function () {
......
......@@ -41,13 +41,12 @@
<div class="row">
<div class="col-md-4">
<div class="fabric"
data-buttons="mockData/fabric.buttons.json"
data-emojis="mockData/qfq.emoji.json"
data-control-name='fabric-output'
data-background-image="mockData/Scan2a.jpeg">
data-background-image="mockData/Scan2a.jpeg"
data-fabric-color='{"red": 255, "blue": 128, "green": 0}'>
</div>
<input id="fabric-output" name="fabric-data" type="hidden">
......
Supports Markdown
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