Skip to content

Commit

Permalink
layout test
Browse files Browse the repository at this point in the history
  • Loading branch information
matrem committed Jan 7, 2024
1 parent 90708ac commit 0cd273e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
4 changes: 3 additions & 1 deletion canvastransform/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
</head>

<body>
<div id="canvasDraw" />
<div id="layout">
<div class="canvasDraw" id="draw0"></div>
</div>
</body>

</html>
6 changes: 3 additions & 3 deletions canvastransform/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
let main = {
MainDraw: class extends draw.TransformedDrawing {
constructor() {
constructor(containerId) {
super({
containerId: "canvasDraw"
containerId: containerId
, unit: "m"
, zoomPow: 2
, showGrid: true
Expand Down Expand Up @@ -91,4 +91,4 @@ let main = {
}
}

new main.MainDraw();
new main.MainDraw("draw0");
18 changes: 15 additions & 3 deletions canvastransform/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,26 @@ html {
body {
margin: 0;
border: 0;
padding: 0%;
padding: 0;
height: 100%;
width: 100%;
}

div#canvasDraw {
div#layout {
margin: 0;
border: 0;
padding: 1%;
height: 100%;
width: 100%;
display: grid;
grid-template-columns: 1fr;
grid-template-rows: 1fr;
}

div.canvasDraw {
/*overflow: hidden;*/
padding: 2%;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}

0 comments on commit 0cd273e

Please sign in to comment.