[the-board] [things] Set size after loading image when not present in state
- From: Lucas Rocha <lucasr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [the-board] [things] Set size after loading image when not present in state
- Date: Tue, 30 Nov 2010 18:26:38 +0000 (UTC)
commit 77a6e2443ccfa95b74d7652abd2b24bbb32e9873
Author: Lucas Rocha <lucasr gnome org>
Date: Tue Nov 30 16:18:09 2010 +0000
[things] Set size after loading image when not present in state
src/js/ui/things/photo.js | 5 ++++-
src/js/ui/things/video.js | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/js/ui/things/photo.js b/src/js/ui/things/photo.js
index df964bf..91d9ac1 100644
--- a/src/js/ui/things/photo.js
+++ b/src/js/ui/things/photo.js
@@ -346,8 +346,11 @@ PhotoThing.prototype = {
loadState : function(state) {
if ('imageFilename' in state) {
+ let fromState = 'width' in state &&
+ 'height' in state;
+
this._updateImageFilename(state.imageFilename,
- true /* from state */);
+ fromState);
}
if ('text' in state) {
diff --git a/src/js/ui/things/video.js b/src/js/ui/things/video.js
index 18526fe..3585b12 100644
--- a/src/js/ui/things/video.js
+++ b/src/js/ui/things/video.js
@@ -578,8 +578,11 @@ VideoThing.prototype = {
loadState : function(state) {
if ('videoFilename' in state) {
+ let fromState = 'width' in state &&
+ 'height' in state;
+
this._updateVideoFilename(state.videoFilename,
- true /* from state */);
+ fromState);
}
if ('text' in state) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]