Skip to content

Commit

Permalink
fix: fix createElement canvas #40
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed Apr 11, 2023
1 parent b2623f0 commit 8fe015c
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/ngx-ruler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@angular/platform-browser": "~13.3.0",
"@angular/platform-browser-dynamic": "~13.3.0",
"@angular/router": "~13.3.0",
"@scena/ruler": "~0.18.2",
"@scena/ruler": "~0.18.3",
"rxjs": "~7.5.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
Expand Down
4 changes: 2 additions & 2 deletions packages/ngx-ruler/projects/ngx-ruler/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-ruler",
"version": "0.17.2",
"version": "0.17.3",
"description": "An Angular Ruler component that can draw grids and scroll infinitely.",
"keywords": [
"scene",
Expand All @@ -22,7 +22,7 @@
},
"homepage": "https://github.com/daybrush/ruler#readme",
"dependencies": {
"@scena/ruler": "~0.18.2",
"@scena/ruler": "~0.18.3",
"tslib": "^2.3.0"
}
}
2 changes: 1 addition & 1 deletion packages/ruler/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scena/ruler",
"version": "0.18.2",
"version": "0.18.3",
"description": "A Vanilla Ruler component that can draw grids and scroll infinitely.",
"main": "./dist/ruler.cjs.js",
"module": "./dist/ruler.esm.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/ruler/src/Ruler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Ruler implements RulerInterface {
this._warp = true;
selfElement = parentElement;
} else {
selfElement = document.createElement("div");
selfElement = document.createElement("canvas");
parentElement.appendChild(selfElement);
}
renderSelf(
Expand Down
6 changes: 3 additions & 3 deletions packages/ruler/tests/manual/portal.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<div class="" style="width: 100%; height: 30px">
<canvas width="100%" height="100%" style="width:100%;height:100%;position: relative;display: block;"></canvas>
<!-- <canvas width="100%" height="100%" style="width:100%;height:100%;position: relative;display: block;"></canvas> -->
</div>

<script src="../../dist/ruler.js"></script>
<script>
const ruler = new Ruler(document.querySelector("canvas"), {
warpSelf: true,
const ruler = new Ruler(document.querySelector("div"), {
// warpSelf: true,
});
</script>
4 changes: 2 additions & 2 deletions packages/svelte-ruler/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "svelte-ruler",
"version": "0.17.2",
"version": "0.17.3",
"description": "A Svelte Ruler component that can draw grids and scroll infinitely.",
"main": "./dist/ruler.cjs.js",
"module": "./dist/ruler.esm.js",
Expand Down Expand Up @@ -51,7 +51,7 @@
"typescript": "^4.5.0 <4.6.0"
},
"dependencies": {
"@scena/ruler": "~0.18.2"
"@scena/ruler": "~0.18.3"
},
"scripts": {
"build": "rollup -c rollup.build.config.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/vue-ruler/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scena/vue-ruler",
"version": "0.16.2",
"version": "0.16.3",
"description": "A Vue Ruler component that can draw grids and scroll infinitely.",
"main": "./dist/ruler.cjs.js",
"module": "./dist/ruler.esm.js",
Expand Down Expand Up @@ -31,7 +31,7 @@
"declaration": "rm -rf declaration && tsc -p tsconfig.declaration.json && cp ./src/components/Ruler.vue.d.ts ./declaration/"
},
"dependencies": {
"@scena/ruler": "~0.18.2"
"@scena/ruler": "~0.18.3"
},
"files": [
"README.md",
Expand Down

0 comments on commit 8fe015c

Please # to comment.