[the-board] [things] Implement validateSize method properly in SoundThing
- From: Lucas Rocha <lucasr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [the-board] [things] Implement validateSize method properly in SoundThing
- Date: Thu, 6 Jan 2011 23:03:47 +0000 (UTC)
commit 73a04e16b9e09ff9e0c20fdefb75d977bc7f3574
Author: Lucas Rocha <lucasr gnome org>
Date: Thu Jan 6 22:58:07 2011 +0000
[things] Implement validateSize method properly in SoundThing
No need to validate anything in case of sound elements because they are
not resizable anyway.
src/js/ui/things/sound.js | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)
---
diff --git a/src/js/ui/things/sound.js b/src/js/ui/things/sound.js
index 7de7893..d5cb8a5 100644
--- a/src/js/ui/things/sound.js
+++ b/src/js/ui/things/sound.js
@@ -635,17 +635,7 @@ SoundThing.prototype = {
},
validateSize : function(width, height) {
- // minWidth and minHeight always have a valid aspect
- // ratio once the sound is loaded (see _onSoundLoadFinished)
- let aspectRatio = this._minWidth / this._minHeight;
-
- // the point here is to keep aspect ratio while
- // resize the sound thing
- if (this._minWidth > this._minHeight) {
- return [width, width / aspectRatio];
- } else {
- return [height * aspectRatio, height];
- }
+ return [width, height];
},
destroy : function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]