-
Notifications
You must be signed in to change notification settings - Fork 498
Open
Description
Hi, love this tool, but there are some things missing. E.g. the possibility of highlighting a currently shown element.
I've written this code:
chardinJs.prototype.getClipPathPolygon = function (element) {
var offset_top = parseInt($(element).offset()["top"]);
var offset_left = parseInt($(element).offset()["left"]);
var width = parseInt($(element)[0].scrollWidth);
var height = parseInt($(element)[0].scrollHeight);
var left = offset_left;
var right = left + width;
var top_y = offset_top;
var bottom_y = top_y + height;
var string = `polygon(0px 0px, 0px 100%, ${left}px 100%, ${left}px ${top_y}px, ${right}px ${top_y}px, ${right}px ${bottom_y}px, ${left}px ${bottom_y}px, ${left}px 100%, 100% 100%, 100% 0px)`;
return string;
};
This has to be attached to the chardin-mask-layer somehow for each click, but I cannot currently find a simple way of doing that.
Metadata
Metadata
Assignees
Labels
No labels