add drawing test for center tool

This commit is contained in:
juliandescottes 2017-01-29 00:11:58 +01:00
parent 35bfcb5f00
commit d781df3290
4 changed files with 130 additions and 1 deletions

View File

@ -64,7 +64,7 @@
events : this.events, events : this.events,
initialState : this.initialState, initialState : this.initialState,
png : png png : png
}); }, null, ' ');
this.reset(); this.reset();

View File

@ -16,6 +16,7 @@
"stroke.json", "stroke.json",
"verticalpen.drawing.json", "verticalpen.drawing.json",
"dithering.basic.json", "dithering.basic.json",
"transform.center.json",
"transform.clone.once.json", "transform.clone.once.json",
"transform.clone.twice.undo.once.json", "transform.clone.twice.undo.once.json",
"transform.rotate.once.alt.json", "transform.rotate.once.alt.json",

View File

@ -14,6 +14,7 @@
"stroke.json", "stroke.json",
"verticalpen.drawing.json", "verticalpen.drawing.json",
"dithering.basic.json", "dithering.basic.json",
"transform.center.json",
"transform.clone.once.json", "transform.clone.once.json",
"transform.clone.twice.undo.once.json", "transform.clone.twice.undo.once.json",
"transform.rotate.once.alt.json", "transform.rotate.once.alt.json",

View File

@ -0,0 +1,127 @@
{
"events": [
{
"event": {
"type": "mousedown",
"button": 0,
"shiftKey": false,
"altKey": false,
"ctrlKey": false
},
"coords": {
"x": 1,
"y": 0
},
"type": "mouse-event"
},
{
"event": {
"type": "mouseup",
"button": 0,
"shiftKey": false,
"altKey": false,
"ctrlKey": false
},
"coords": {
"x": 1,
"y": 0
},
"type": "mouse-event"
},
{
"type": "instrumented-event",
"methodName": "addFrame",
"args": []
},
{
"event": {
"type": "mousedown",
"button": 0,
"shiftKey": false,
"altKey": false,
"ctrlKey": false
},
"coords": {
"x": 1,
"y": 2
},
"type": "mouse-event"
},
{
"event": {
"type": "mouseup",
"button": 0,
"shiftKey": false,
"altKey": false,
"ctrlKey": false
},
"coords": {
"x": 1,
"y": 2
},
"type": "mouse-event"
},
{
"type": "transformtool-event",
"toolId": "tool-center",
"event": {
"shiftKey": false,
"altKey": false,
"ctrlKey": false
}
},
{
"type": "instrumented-event",
"methodName": "addFrame",
"args": []
},
{
"event": {
"type": "mousedown",
"button": 0,
"shiftKey": false,
"altKey": false,
"ctrlKey": false
},
"coords": {
"x": 0,
"y": 2
},
"type": "mouse-event"
},
{
"event": {
"type": "mouseup",
"button": 0,
"shiftKey": false,
"altKey": false,
"ctrlKey": false
},
"coords": {
"x": 0,
"y": 2
},
"type": "mouse-event"
},
{
"type": "transformtool-event",
"toolId": "tool-center",
"event": {
"shiftKey": true,
"altKey": false,
"ctrlKey": false
}
}
],
"initialState": {
"size": {
"width": 3,
"height": 3
},
"primaryColor": "#000000",
"secondaryColor": "rgba(0, 0, 0, 0)",
"selectedTool": "tool-pen",
"penSize": 1
},
"png": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAADCAYAAABBCiV2AAAAGUlEQVQYV2NkIAIwQtX8Z2BgwMmGSeA1DwCjQQMEFdnXsgAAAABJRU5ErkJggg=="
}