Skip to content

Commit

Permalink
Avoid BR elements when detecting click selection.
Browse files Browse the repository at this point in the history
  • Loading branch information
denshade committed Mar 22, 2019
1 parent b8d92c0 commit 84861c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Custom Imagemap",
"namespace": "uzgent\\ImageMapClass",
"description": "This is an imagemap implementation that allows users to define their own images and corresponding imagemaps and checkboxes.",
"description": "This is an imagemap implementation that allows users to define their own images and corresponding imagemaps linked with checkboxes.",
"authors": [
{
"name": "Lieven Vaneeckhaute",
Expand Down
2 changes: 1 addition & 1 deletion imagemap.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ function ImageMapAug(imageIdL, mapIdL, updateFunctionL, fillColor) {
var ctx = tempcanvas.getContext("2d");

childNodes.forEach(function (child) {
if (child.nodeType !== Node.TEXT_NODE && child.nodeType !== Node.COMMENT_NODE ) {
if (child.nodeType !== Node.TEXT_NODE && child.nodeType !== Node.COMMENT_NODE && child.getAttribute("coords") != null) {
ctx.clearRect(0, 0, tempcanvas.width, tempcanvas.height);
draw(ctx, child.getAttribute("coords").split(","), "rgb(255,212,0)");
var p = ctx.getImageData(x, y, 1, 1).data;
Expand Down

0 comments on commit 84861c1

Please sign in to comment.