From ef1b927861f9a949aed20341144ffb5bfd42f038 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Mon, 19 Sep 2022 11:22:21 +1000 Subject: Removing the web client --- javascript/app/components/bottom-panel.js | 52 ------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 javascript/app/components/bottom-panel.js (limited to 'javascript/app/components/bottom-panel.js') diff --git a/javascript/app/components/bottom-panel.js b/javascript/app/components/bottom-panel.js deleted file mode 100644 index 6415d0e..0000000 --- a/javascript/app/components/bottom-panel.js +++ /dev/null @@ -1,52 +0,0 @@ -import Ember from 'ember'; - -function show(component) { - const height = Math.floor(component.$containerElement.height() /2); - component.$().css({ - "display":"block", - "top" : height+"px" - }); - component.$topPanelElement.css({ - "height":height+"px" - }); -} - -function hide(component) { - const height = Math.floor(component.$containerElement.height()/2); - component.$().css({ - "display":"none", - "height":height+"px" - }); - component.$topPanelElement.css({ - "height":"100%" - }); -} - -export default Ember.Component.extend({ - classNames:["bottom-panel"], - didInsertElement : function () { - this._super(...arguments); - this.$topPanelElement = Ember.$(this.get('topPanelElementId')); - this.$containerElement = Ember.$(this.get('containerElementId')); - Ember.run.next(this,() => { - Ember.$(this.element).resizable({ - handles:"n", - maxHeight:700, - minHeight:200, - resize: (event,ui) => { - Ember.run.next(this,() => { - this.$topPanelElement.css({"height": this.$containerElement.height() - ui.size.height}); - }); - } - }); - }); - }, - visibilityObserver : Ember.observer('visible',function () { - this.get('visible') ? show(this) : hide(this); - }), - actions : { - close () { - this.set('visible',false); - } - } -}); -- cgit v1.2.3