mirror of
https://github.com/konvajs/konva.git
synced 2026-01-23 05:14:58 +08:00
changed drawFunc to sceneFunc and drawHitFunc to hitFunc
This commit is contained in:
@@ -933,7 +933,7 @@ suite('MouseEvents', function() {
|
||||
strokeWidth: 4,
|
||||
fill: 'red',
|
||||
stroke: 'black',
|
||||
drawHitFunc: function(context) {
|
||||
hitFunc: function(context) {
|
||||
var _context = context._context;
|
||||
|
||||
_context.beginPath();
|
||||
@@ -990,7 +990,7 @@ suite('MouseEvents', function() {
|
||||
|
||||
// set drawBufferFunc with setter
|
||||
|
||||
circle.setDrawHitFunc(function(context) {
|
||||
circle.hitFunc(function(context) {
|
||||
var _context = context._context;
|
||||
_context.beginPath();
|
||||
_context.arc(0, 0, this.getRadius() - 50, 0, Math.PI * 2, true);
|
||||
|
||||
@@ -2221,7 +2221,7 @@ suite('Node', function() {
|
||||
var stage = Kinetic.Node.create(json, container);
|
||||
|
||||
stage.find('#myTriangle').each(function(node) {
|
||||
node.setDrawFunc(drawTriangle);
|
||||
node.sceneFunc(drawTriangle);
|
||||
});
|
||||
|
||||
stage.draw();
|
||||
|
||||
@@ -530,11 +530,11 @@ suite('Shape', function() {
|
||||
rect.strokeWidth(8);
|
||||
assert.equal(rect.strokeWidth(), 8);
|
||||
|
||||
rect.drawFunc('function');
|
||||
assert.equal(rect.drawFunc(), 'function');
|
||||
rect.sceneFunc('function');
|
||||
assert.equal(rect.sceneFunc(), 'function');
|
||||
|
||||
rect.drawHitFunc('function');
|
||||
assert.equal(rect.drawHitFunc(), 'function');
|
||||
rect.hitFunc('function');
|
||||
assert.equal(rect.hitFunc(), 'function');
|
||||
|
||||
rect.dashArray([1]);
|
||||
assert.equal(rect.dashArray()[0], 1);
|
||||
|
||||
Reference in New Issue
Block a user