Extract empty image

pull/1193/head
Paulus Schoutsen 2018-05-18 15:01:45 -04:00
parent 960bdc0c9b
commit 5ede26f162
2 changed files with 4 additions and 1 deletions

View File

@ -0,0 +1,2 @@
/** An empty image which can be set as src of an img element. */
export default 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';

View File

@ -2,6 +2,7 @@ import { html } from '@polymer/polymer/lib/utils/html-tag.js';
import { PolymerElement } from '@polymer/polymer/polymer-element.js';
import computeStateName from '../../../common/entity/compute_state_name.js';
import emptyImageBase64 from '../../../common/empty_image_base64.js';
import EventsMixin from '../../../mixins/events-mixin.js';
/*
@ -67,7 +68,7 @@ class MoreInfoCamera extends EventsMixin(PolymerElement) {
'?token=' + stateObj.attributes.access_token;
}
// Return an empty image if no stateObj (= dialog not open) or in cleanup mode.
return 'data:image/gif;base64,R0lGODlhAQABAAAAACw=';
return emptyImageBase64;
}
}