mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 01:57:14 +08:00
Kinetic.Line detection type is now defaulted to pixel since this is the expected detection strategy
This commit is contained in:
parent
51258531bf
commit
502115fad7
3
dist/kinetic-core.js
vendored
3
dist/kinetic-core.js
vendored
@ -3640,7 +3640,8 @@ Kinetic.Line = function(config) {
|
||||
this.setDefaultAttrs({
|
||||
points: [],
|
||||
lineCap: 'butt',
|
||||
dashArray: []
|
||||
dashArray: [],
|
||||
detectionType: 'pixel'
|
||||
});
|
||||
|
||||
this.shapeType = "Line";
|
||||
|
29
dist/kinetic-core.min.js
vendored
29
dist/kinetic-core.min.js
vendored
File diff suppressed because one or more lines are too long
@ -11,7 +11,8 @@ Kinetic.Line = function(config) {
|
||||
this.setDefaultAttrs({
|
||||
points: [],
|
||||
lineCap: 'butt',
|
||||
dashArray: []
|
||||
dashArray: [],
|
||||
detectionType: 'pixel'
|
||||
});
|
||||
|
||||
this.shapeType = "Line";
|
||||
|
@ -1219,10 +1219,11 @@ Test.prototype.tests = {
|
||||
}, {
|
||||
x: 340,
|
||||
y: 23
|
||||
}, {
|
||||
}
|
||||
/*, {
|
||||
x: 500,
|
||||
y: 109
|
||||
}];
|
||||
}*/];
|
||||
|
||||
var line = new Kinetic.Line({
|
||||
points: points,
|
||||
@ -1233,9 +1234,17 @@ Test.prototype.tests = {
|
||||
draggable: true
|
||||
});
|
||||
|
||||
// test that default detection type is pixel
|
||||
test(line.getDetectionType() === 'pixel', 'dection type should be pixel');
|
||||
|
||||
layer.add(line);
|
||||
stage.add(layer);
|
||||
|
||||
line.saveData();
|
||||
|
||||
line.on('dragend', function() {
|
||||
line.saveData();
|
||||
});
|
||||
},
|
||||
'SHAPES - add dashed line': function(containerId) {
|
||||
var stage = new Kinetic.Stage({
|
||||
|
Loading…
Reference in New Issue
Block a user