| 1 |
/* |
| 2 |
* Copyright (C) 2012 Canonical Ltd. |
| 3 |
* |
| 4 |
* This program is free software: you can redistribute it and/or modify |
| 5 |
* it under the terms of the GNU General Public License version 3 as |
| 6 |
* published by the Free Software Foundation. |
| 7 |
* |
| 8 |
* This program is distributed in the hope that it will be useful, |
| 9 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 |
* GNU General Public License for more details. |
| 12 |
* |
| 13 |
* You should have received a copy of the GNU General Public License |
| 14 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 |
* |
| 16 |
* Authors: |
| 17 |
* Jim Nelson <[email protected]> |
| 18 |
* Charles Lindsay <[email protected]> |
| 19 |
*/ |
| 20 |
|
| 21 |
// Animation durations, in milliseconds. For SNAP_DURATION, use linear easing; |
| 22 |
// others should use some form of quint easing. Note that these names are |
| 23 |
// based on names from animation guidelines, but the values are made up and |
| 24 |
// should eventually come from the SDK. |
| 25 |
var SNAP_DURATION = 175; |
| 26 |
var FAST_DURATION = 300; |
| 27 |
var SLOW_DURATION = 700; |
| 28 |
var SLEEPY_DURATION = 1500; |
| 29 |
|
| 30 |
var EVENT_TIMELINE_MEDIA_SOURCE_OPACITY = 0.8; |
| 31 |
var EVENT_TIMELINE_EVENT_CARD_OPACITY = 1.0; |
| 32 |
|
| 33 |
//This is deprecated |
| 34 |
var HIGHLIGHT_BUTTON_COLOR = "#c94212" |
| 35 |
|
| 36 |
function isSmallFormFactor(form_factor) { |
| 37 |
if (!form_factor) |
| 38 |
form_factor = FORM_FACTOR; // From C++. |
| 39 |
|
| 40 |
return (form_factor === 'phone' || form_factor === 'sidebar'); |
| 41 |
} |
| 42 |
|
| 43 |
function isDesktop(form_factor) { |
| 44 |
if (!form_factor) |
| 45 |
form_factor = FORM_FACTOR; // From C++. |
| 46 |
|
| 47 |
return (form_factor === 'desktop'); |
| 48 |
} |