mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
SDA-2571 Fixed triggering multiple BI calls
This commit is contained in:
parent
82d8dd8479
commit
d84d54239c
@ -52,6 +52,10 @@ class ScreenSnippet {
|
||||
if (isLinux) {
|
||||
this.captureUtil = '/usr/bin/gnome-screenshot';
|
||||
}
|
||||
|
||||
ipcMain.on('send-tracking-data-to-main', async (_event, eventData: { element: AnalyticsElements, type: ScreenSnippetActionTypes }) => {
|
||||
analytics.track({ element: eventData.element, action_type: eventData.type });
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@ -116,7 +120,6 @@ class ScreenSnippet {
|
||||
windowHandler.closeSnippingToolWindow();
|
||||
windowHandler.createSnippingToolWindow(this.outputFilePath, dimensions);
|
||||
this.uploadSnippet(webContents);
|
||||
this.sendAnalytics();
|
||||
return;
|
||||
}
|
||||
const {
|
||||
@ -287,16 +290,6 @@ class ScreenSnippet {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Send analytics data to analytics module
|
||||
*/
|
||||
private sendAnalytics() {
|
||||
ipcMain.on('send-tracking-data-to-main', async (_event, eventData: { element: AnalyticsElements, type: ScreenSnippetActionTypes }) => {
|
||||
analytics.track({element: eventData.element, action_type: eventData.type});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const screenSnippet = new ScreenSnippet();
|
||||
|
@ -1021,7 +1021,6 @@ export class WindowHandler {
|
||||
const scaleFactor = display.scaleFactor;
|
||||
const scaledImageDimensions = { height: Math.floor(snipDimensions.height / scaleFactor), width: Math.floor(snipDimensions.width / scaleFactor) };
|
||||
logger.info('window-handler, createSnippingToolWindow: Image will open with scaled dimensions: ' + JSON.stringify(scaledImageDimensions));
|
||||
// const scaledImageDimensions = snipDimensions;
|
||||
|
||||
const annotateAreaHeight = scaledImageDimensions.height > availableAnnotateAreaHeight ?
|
||||
availableAnnotateAreaHeight :
|
||||
|
Loading…
Reference in New Issue
Block a user