From 54f7533673d7ada520ee25c2a8ecd6feab28252a Mon Sep 17 00:00:00 2001 From: Vijay A Date: Mon, 6 Sep 2021 20:32:08 +0530 Subject: Revert "refactor: trying to fix zoom in/out being sticky for the last active service when started up" This reverts commit 947a776e1ed902a218af0f634bfa9d320678ce93. --- src/stores/ServicesStore.js | 41 +---------------------------------------- 1 file changed, 1 insertion(+), 40 deletions(-) (limited to 'src/stores') diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index 9ee3effaa..75bc71388 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js @@ -99,9 +99,6 @@ export default class ServicesStore extends Store { this.actions.service.openDevToolsForActiveService.listen( this._openDevToolsForActiveService.bind(this), ); - this.actions.service.zoomInForActiveService.listen(this._zoomInForActiveService.bind(this)); - this.actions.service.zoomOutForActiveService.listen(this._zoomOutForActiveService.bind(this)); - this.actions.service.zoomResetForActiveService.listen(this._zoomResetForActiveService.bind(this)); this.actions.service.hibernate.listen(this._hibernate.bind(this)); this.actions.service.awake.listen(this._awake.bind(this)); this.actions.service.resetLastPollTimer.listen( @@ -965,45 +962,9 @@ export default class ServicesStore extends Store { @action _openDevToolsForActiveService() { const service = this.active; - if (service) { - this._openDevTools({ serviceId: service.id }); - } else { - debug('No service is active'); - } - } - - @action _zoomInForActiveService() { - const service = this.active; - if (service) { - debug(`active service : ${service.id}`); - const level = service.webview.getZoomLevel(); - // level 9 =~ +300% and setZoomLevel wouldnt zoom in further - if (level < 9) { - service.webview.setZoomLevel(level + 1); - } - } else { - debug('No service is active'); - } - } - - @action _zoomOutForActiveService() { - const service = this.active; - if (service) { - debug(`active service : ${service.id}`); - const level = service.webview.getZoomLevel(); - // level -9 =~ -50% and setZoomLevel wouldnt zoom out further - if (level > -9) { - service.webview.setZoomLevel(level - 1); - } - } else { - debug('No service is active'); - } - } - @action _zoomResetForActiveService() { - const service = this.active; if (service) { - service.webview.setZoomLevel(0); + this._openDevTools({ serviceId: service.id }); } else { debug('No service is active'); } -- cgit v1.2.3-70-g09d2