Comments (4)
Oh wow, I don't know why this is happening!
It is good practice to have the doctype directive in html files, see https://developer.mozilla.org/en-US/docs/Glossary/Doctype
Its sole purpose is to prevent a browser from switching into so-called "quirks mode" when rendering a document; that is, the "" doctype ensures that the browser makes a best-effort attempt at following the relevant specifications, rather than using a different rendering mode that is incompatible with some specifications.
Unfortunate this is happening. I see it happen in chrome firefox and safari...
Going to investigate a bit to see what is up. As a workaround, you can set the width and height on the canvas with Html.Attributes.style.
BTW in this ellie https://ellie-app.com/mSkWgBR8Q5Na1, I tried removing the doctype and it still shows the red bar at the bottom
from elm-canvas.
https://stackoverflow.com/questions/7266276/doctype-affects-width-and-height-of-html-body-canvas
from elm-canvas.
Exactly right, adding display: block;
to the inner canvas fixes this... What a dumb default for a canvas element, display inline...
This needs fixing in the library then
from elm-canvas.
Exactly right, adding
display: block;
to the inner canvas fixes this... What a dumb default for a canvas element, display inline... facepalmThis needs fixing in the library then +1
Thanks for finding a solution @joakin. I suspected something a little more tricky, but in the end it's a pretty easy fix then :)
Have a great week
from elm-canvas.
Related Issues (20)
- clearrect for transparent background HOT 1
- Improve transform docs
- Improve arc docs
- Document the canvas coordinate system
- Add making textures from DOM images HOT 1
- Canvases get blank on deleting one of them from a List HOT 2
- DOM images textures break in Firefox HOT 6
- High CPU load with many canvases HOT 7
- Sampling Canvas Data (getImageData) HOT 3
- Text Color Support HOT 1
- Use `Result` rather than `Maybe` for texture loading HOT 1
- Use elm-geometry types? HOT 1
- Support for "groups" or similar batching of settings to multiple `Renderable` HOT 4
- Runtime crash with `arc` function and negative radius
- Regression: text without fill or stroke is rendered with both fill and stroke
- Not working HOT 3
- Unexpected scene HOT 1
- Question about filter HOT 1
- Please support `roundRect` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elm-canvas.