mirror of
https://github.com/konvajs/konva.git
synced 2025-09-18 18:10:54 +08:00
renamed the Crop filter to Mask
This commit is contained in:
@@ -408,7 +408,7 @@ Test.Modules.IMAGE = {
|
||||
|
||||
showHit(layer);
|
||||
},
|
||||
'crop unicolor background filter': function(containerId) {
|
||||
'*mask unicolor background filter': function(containerId) {
|
||||
var imageObj = new Image();
|
||||
imageObj.onload = function() {
|
||||
var stage = new Kinetic.Stage({
|
||||
@@ -436,13 +436,13 @@ Test.Modules.IMAGE = {
|
||||
layer.add(filtered);
|
||||
stage.add(layer);
|
||||
|
||||
filtered.applyFilter(Kinetic.Filters.Crop, {
|
||||
filtered.applyFilter(Kinetic.Filters.Mask, {
|
||||
threshold: 10
|
||||
}, function() {
|
||||
layer.draw();
|
||||
var dataUrl = layer.toDataURL();
|
||||
//console.log(dataUrl);
|
||||
testDataUrl(dataUrl, 'crop filter', 'problem with Crop filter.');
|
||||
testDataUrl(dataUrl, 'mask filter', 'problem with Mask filter.');
|
||||
});
|
||||
};
|
||||
imageObj.src = '../assets/bamoon.jpg';
|
||||
|
@@ -176,7 +176,7 @@ Test.Modules.Text = {
|
||||
var text = new Kinetic.Text({
|
||||
x: 10,
|
||||
y: 10,
|
||||
text: 'HEADING\n\nAll the world\'s a stage, and all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts.',
|
||||
text: 'HEADING\n\nAll the world\'s a stage, merely players. They have their exits and their entrances; And one man in his time plays many parts.',
|
||||
//text: 'HEADING\n\nThis is a really cool paragraph. \n And this is a footer.',
|
||||
fontSize: 24,
|
||||
fontFamily: 'Calibri',
|
||||
@@ -185,7 +185,7 @@ Test.Modules.Text = {
|
||||
//width: 20,
|
||||
width: 380,
|
||||
//width: 200,
|
||||
padding: 0,
|
||||
padding: 10,
|
||||
align: 'center',
|
||||
draggable: true,
|
||||
wrap: 'WORD'
|
||||
|
Reference in New Issue
Block a user