mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2025-02-17 17:01:12 -05:00
improve paint_editor event
There was only one paint editor event and it only distig,nuished between character or background. This change distinguishes between editing a background from the library vs user-created. For characters it distinguishes between new and edit, and between library assets or user-created.
This commit is contained in:
parent
b6a1569438
commit
2c4520e9e1
1 changed files with 10 additions and 1 deletions
|
@ -161,7 +161,16 @@ export default class Paint {
|
|||
}
|
||||
|
||||
static open (bkg, md5, sname, cname, cscale, sw, sh) {
|
||||
iOS.analyticsEvent('editor', 'paint_editor_opened', bkg ? 'bkg' : 'character');
|
||||
let action = '';
|
||||
let label = '';
|
||||
if (bkg) {
|
||||
action = 'edit_background';
|
||||
label = (md5 in MediaLib.keys) ? md5 : 'user_background';
|
||||
} else {
|
||||
action = sname ? 'edit_character' : 'new_character';
|
||||
label = (md5 in MediaLib.keys) ? md5 : 'user_character';
|
||||
}
|
||||
iOS.analyticsEvent('paint_editor', action, label);
|
||||
PaintUndo.buffer = [];
|
||||
PaintUndo.index = 0;
|
||||
maxZoom = 5;
|
||||
|
|
Loading…
Reference in a new issue