mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Issue #258 : Add pensize support to DrawingTest + add pensize test suite
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
$.subscribe(Events.MOUSE_EVENT, this.onMouseEvent_.bind(this));
|
||||
$.subscribe(Events.KEYBOARD_EVENT, this.onKeyboardEvent_.bind(this));
|
||||
$.subscribe(Events.TOOL_SELECTED, this.onToolEvent_.bind(this));
|
||||
$.subscribe(Events.PEN_SIZE_CHANGED, this.onPenSizeChanged_.bind(this));
|
||||
$.subscribe(Events.TRANSFORMATION_EVENT, this.onTransformationEvent_.bind(this));
|
||||
$.subscribe(Events.PRIMARY_COLOR_SELECTED, this.onColorEvent_.bind(this, true));
|
||||
$.subscribe(Events.SECONDARY_COLOR_SELECTED, this.onColorEvent_.bind(this, false));
|
||||
@@ -48,7 +49,8 @@
|
||||
},
|
||||
primaryColor : pskl.app.selectedColorsService.getPrimaryColor(),
|
||||
secondaryColor : pskl.app.selectedColorsService.getSecondaryColor(),
|
||||
selectedTool : pskl.app.toolController.currentSelectedTool.toolId
|
||||
selectedTool : pskl.app.toolController.currentSelectedTool.toolId,
|
||||
penSize : pskl.app.penSizeService.getPenSize()
|
||||
};
|
||||
};
|
||||
|
||||
@@ -111,6 +113,15 @@
|
||||
}
|
||||
};
|
||||
|
||||
ns.DrawingTestRecorder.prototype.onPenSizeChanged_ = function (evt) {
|
||||
if (this.isRecording) {
|
||||
var recordEvent = {};
|
||||
recordEvent.type = 'pensize-event';
|
||||
recordEvent.penSize = pskl.app.penSizeService.getPenSize();
|
||||
this.events.push(recordEvent);
|
||||
}
|
||||
};
|
||||
|
||||
ns.DrawingTestRecorder.prototype.onTransformationEvent_ = function (evt, toolId, domEvent) {
|
||||
if (this.isRecording) {
|
||||
var recordEvent = {};
|
||||
|
||||
Reference in New Issue
Block a user