resolve chrome warning. close #1417

This commit is contained in:
Anton Lavrenov
2023-04-05 20:47:00 -06:00
parent 742c08599a
commit ac6de95024
4 changed files with 18 additions and 43 deletions

View File

@@ -43,47 +43,14 @@
width: 100,
height: 100,
fill: 'red',
filters: [Konva.Filters.Blur],
blurRadius: 10,
});
layer.add(rect);
stage.on('wheel', (e) => {
e.evt.preventDefault();
console.log('wheel');
});
stage.on('contextmenu', (e) => {
console.log('click');
});
var imageObj = new Image();
imageObj.onload = function () {
var yoda = new Konva.Image({
x: 150,
y: 50,
image: imageObj,
width: 200,
height: 200,
draggable: true,
strokeWidth: 4,
stroke: 'blue',
cornerRadius: [10, 20, 30, 40],
});
layer.add(yoda);
};
imageObj.src = 'https://konvajs.org/assets/yoda.jpg';
Konva.Image.fromURL('https://konvajs.org/assets/darth-vader.jpg', function (darthNode) {
darthNode.setAttrs({
x: 300,
y: 50,
// scaleX: 0.5,
// scaleY: 0.5,
draggable: true,
strokeEnabled: true,
stroke: 'green',
strokeWidth: 2,
cornerRadius: 30,
});
layer.add(darthNode);
});
rect.cache();
setInterval(() => {
rect.blurRadius(rect.blurRadius() + 1);
}, 100);
</script>
</body>
</html>