From e46c53da3c8ea89afd2f7ba0fab08a8ee157cdf5 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Mon, 25 Mar 2019 13:27:40 +0700 Subject: [PATCH] Remove enable property * Not needed for banner --- web/source/osk/banner.ts | 35 +++++------------------------------ 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/web/source/osk/banner.ts b/web/source/osk/banner.ts index 553e01613d..2bd3dad353 100644 --- a/web/source/osk/banner.ts +++ b/web/source/osk/banner.ts @@ -3,7 +3,6 @@ namespace com.keyman.osk { // Base class for a banner above the keyboard in the OSK export abstract class Banner { - private _enabled: boolean; private _height: number; // pixels private div: HTMLDivElement; @@ -32,26 +31,6 @@ namespace com.keyman.osk { this.update(); } - /** - * Function enable - * Scope Public - * @return {boolean} true if the banner is enabled - * Description Returns whether the banner is enabled or not - */ - public get enable(): boolean { - return this._enabled; - } - - /** - * Function enable - * Scope Public - * @param {boolean} enable true if the banner is to be enabled - * Description Sets whether the banner is enabled or not - */ - public set enable(enable: boolean) { - this._enabled = enable; - } - /** * Function update * @return {boolean} true if the banner styling changed @@ -74,7 +53,7 @@ namespace com.keyman.osk { !(currentDisplayStyle === ds.display)); } - public constructor(enabled: boolean, height?: number) { + public constructor(height?: number) { let keymanweb = com.keyman.singleton; let util = keymanweb.util; @@ -83,7 +62,6 @@ namespace com.keyman.osk { d.className = "kmw-banner-bar"; this.div = d; - this.enable = enabled; this.height = height; this.update(); } @@ -113,7 +91,7 @@ namespace com.keyman.osk { export class BlankBanner extends Banner { constructor() { - super(true, 0); + super(0); } } @@ -128,12 +106,12 @@ namespace com.keyman.osk { constructor(imagePath, height?: number) { if (imagePath.length > 0) { - super(true); + super(); if (height) { this.height = height; } } else { - super(true, 0); + super(0); } this.img = document.createElement('img'); @@ -154,9 +132,6 @@ namespace com.keyman.osk { if (this.img) { this.img.setAttribute('src', imagePath); } - if (imagePath.length > 0) { - this.enable = true; - } } } @@ -266,7 +241,7 @@ namespace com.keyman.osk { private suggestionList : BannerSuggestion[]; constructor() { - super(true, SuggestionBanner.DEFAULT_HEIGHT); + super(SuggestionBanner.DEFAULT_HEIGHT); this.suggestionList = new Array(); for (var i=0; i