Responsive (#1) make editor responsive

* Make canvas responsive

* made the editor to appear in the middle
This commit is contained in:
Sofie Kedvik
2017-05-16 13:06:36 +02:00
committed by GitHub
parent 1ec1a8edfa
commit b0888a58cd
3 changed files with 16 additions and 2 deletions
+1 -1
View File
@@ -29,7 +29,7 @@
</form> </form>
<br /><br /> <br /><br />
<div id="wrapper"> <div id="wrapper">
<canvas id="canvas-editor" width="1253" height="600" data-image-id="45809"></canvas> <canvas id="canvas-editor" data-image-id="45809"></canvas>
</div> </div>
<br /><br /><br /> <br /><br /><br />
</div> </div>
+13 -1
View File
@@ -23,6 +23,18 @@
width: 100%; width: 100%;
} }
.canvas-container { #wrapper {
margin: 0 auto; margin: 0 auto;
} }
.canvas-container {
margin: 0 auto;
width: 100% !important;
}
canvas {
margin: 0 auto;
position: relative !important;
max-width: 100% !important;
height: auto !important;
}
+2
View File
@@ -14,6 +14,8 @@ var Canvas = fabric.util.createClass(fabric.Canvas, {
backgroundColor: '#d4d4d4', backgroundColor: '#d4d4d4',
preserveObjectStacking: true, preserveObjectStacking: true,
selection: false, selection: false,
width: 1253,
height: 600
}); });
this.on('mouse:up', function () { this.on('mouse:up', function () {