Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
opus1269 committed Apr 8, 2019
1 parent 2ac44ec commit 657d62d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 22 deletions.
6 changes: 2 additions & 4 deletions app/elements/app-main/app-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const PUSHY_URI =

/**
* Array of pages
* @type {module:els/app_main.Page[]}
* @type {Page[]}
*/
const pages: Page[] = [
{
Expand Down Expand Up @@ -189,8 +189,6 @@ const pages: Page[] = [

/**
* Google Photos Page
* @type {module:els/pgs/google_photos.GooglePhotosPage}
* @private
*/
let gPhotosPage: any;

Expand Down Expand Up @@ -726,7 +724,7 @@ Polymer({
if (request.message === ChromeMsg.HIGHLIGHT.message) {
// highlight ourselves and let the sender know we are here
const chromep = new ChromePromise();
chromep.tabs.getCurrent().then((tab: chrome.tabs.Tab): any => {
chromep.tabs.getCurrent().then((tab: chrome.tabs.Tab): chrome.tabs.Tab => {
chrome.tabs.update(tab.id, {highlighted: true});
return null;
}).catch((err: Error) => {
Expand Down
3 changes: 1 addition & 2 deletions app/elements/screensaver-element/screensaver-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,7 @@ const Screensaver = Polymer({

/**
* Event: Error state changed for a photo view
* @param {Event} ev - the event object
* @param {Object} ev.model - template model
* @param ev - the event object
*/
_onErrorChanged: async function(ev: any) {
const isError: boolean = ev.detail.value;
Expand Down
15 changes: 5 additions & 10 deletions app/scripts/screensaver/views/ss_view_frame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ import SSPhoto from '../ss_photo.js';

/**
* Frame view
* @extends module:ss/views/view.SSView
* @alias module:ss/views/view_frame.SSViewFrame
*/
class SSViewFrame extends SSView {
export default class SSViewFrame extends SSView {

/**
* Set style info for a label
Expand All @@ -31,13 +29,13 @@ class SSViewFrame extends SSView {
* @static
* @private
*/
private static _setLabelStyle(style: any, width: number, height: number, isLeft: boolean) {
private static _setLabelStyle(style: CSSStyleDeclaration, width: number, height: number, isLeft: boolean) {
style.textOverflow = 'ellipsis';
style.whiteSpace = 'nowrap';
style.color = 'black';
style.opacity = 1.0;
style.opacity = '1.0';
style.fontSize = '2.5vh';
style.fontWeight = 400;
style.fontWeight = '400';

// percent of screen width for label padding
const padPer = 0.5;
Expand Down Expand Up @@ -66,7 +64,7 @@ class SSViewFrame extends SSView {

/**
* Create new SSViewFrame
* @param {module:ss/photo.SSPhoto} photo
* @param photo - the photo to render
* @constructor
*/
constructor(photo: SSPhoto) {
Expand All @@ -85,7 +83,6 @@ class SSViewFrame extends SSView {
const timeStyle = this.time.style;
const image = this.image;
const imageStyle = image.style;
// @ts-ignore
const img: any = image.$.img;
const imgStyle = img.style;
const photo = this.photo;
Expand Down Expand Up @@ -153,5 +150,3 @@ class SSViewFrame extends SSView {
}
}

export default SSViewFrame;

8 changes: 2 additions & 6 deletions app/scripts/screensaver/views/ss_view_full.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@ import SSPhoto from '../ss_photo.js';

/**
* Full view
* @extends module:ss/views/view.SSView
* @alias module:ss/views/view_full.SSViewFull
*/
class SSViewFull extends SSView {
export default class SSViewFull extends SSView {

/**
* Create new SSViewFull
* @param {module:ss/photo.SSPhoto} photo - An {@link module:ss/photo.SSPhoto}
* @param photo - An {@link SSPhoto}
* @constructor
*/
constructor(photo: SSPhoto) {
Expand All @@ -37,13 +36,10 @@ class SSViewFull extends SSView {
public render() {
super.render();

// @ts-ignore
const img: any = this.image.$.img;
img.style.width = '100%';
img.style.height = '100%';
img.style.objectFit = 'fill';
}
}

export default SSViewFull;

0 comments on commit 657d62d

Please sign in to comment.