Skip to content

Commit

Permalink
Updated files for lecture 12
Browse files Browse the repository at this point in the history
Updated canvas image example, updated canvas text, added missing alt attribute in the drag & drop example and removed canvas-text from Modernizr.
  • Loading branch information
hochleitner committed Jan 16, 2022
1 parent b5bda94 commit dff8dad
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion vl12/canvas_bilder.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
</style>
</head>
<body>
<img src="html5logo.png" alt="HTML5 Logo" id="image">
<div>
<img src="html5logo.png" alt="HTML5 Logo" id="image">
</div>
<canvas width="640" height="480" id="draw">Ihr Browser unterstützt Canvas leider nicht!</canvas>

<script>
Expand Down
4 changes: 2 additions & 2 deletions vl12/canvas_text.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
const canvas = document.getElementById("draw");
const ctx = canvas.getContext("2d");
ctx.font = "bold 24pt Arial, sans-serif";
ctx.fillText("Hallo HM1!", 200, 50);
ctx.fillText("Hallo HYP1!", 200, 50);
ctx.textAlign = "right";
ctx.strokeText("Hallo HM1!", 200, 100);
ctx.strokeText("Hallo HYP1!", 200, 100);
</script>
</body>
</html>
4 changes: 2 additions & 2 deletions vl12/draganddrop.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
</head>
<body>
<div class="dropzone">
<img src="html5logo.png" id="dragimage" draggable="true">
<img src="html5logo.png" alt="HTML5 Logo" id="dragImage" draggable="true">
</div>

<div class="dropzone"></div>

<div class="dropzone"></div>

<script>
const dragImage = document.getElementById("dragimage");
const dragImage = document.getElementById("dragImage");
const dropZones = document.getElementsByClassName("dropzone");

dragImage.addEventListener("dragstart", function (event) {
Expand Down
4 changes: 2 additions & 2 deletions vl12/modernizr-custom.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dff8dad

Please sign in to comment.