Responsive (#1) make editor responsive
* Make canvas responsive * made the editor to appear in the middle
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
|
|||||||
@@ -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 () {
|
||||||
|
|||||||
Reference in New Issue
Block a user