Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Bug 1217789 - [music][RTL] The back button in the song picker is left…
Browse files Browse the repository at this point in the history
…-aligned
  • Loading branch information
justindarc committed Oct 29, 2015
1 parent 82ce2c9 commit 2f91717
Show file tree
Hide file tree
Showing 35 changed files with 1,819 additions and 765 deletions.
5 changes: 3 additions & 2 deletions apps/music/bower.json
Expand Up @@ -14,14 +14,15 @@
"fast-list": "gaia-components/fast-list#master",
"gaia-component": "gaia-components/gaia-component#~0.3.9",
"gaia-fast-list": "gaia-components/gaia-fast-list#master",
"gaia-header": "gaia-components/gaia-header#~0.8.4",
"gaia-header": "gaia-components/gaia-header#~0.9.5",
"gaia-icons": "gaia-components/gaia-icons#~0.8.0",
"gaia-theme": "gaia-components/gaia-theme#~0.5.1",
"gaia-toolbar": "gaia-components/gaia-toolbar#master",
"serviceworkerware": "gaia-components/serviceworkerware#master",
"sww-raw-cache": "gaia-components/sww-raw-cache#~0.2.1"
},
"resolutions": {
"gaia-component": "~0.3.9"
"gaia-component": "~0.4.0",
"gaia-icons": "~0.10.3"
}
}
4 changes: 2 additions & 2 deletions apps/music/components/fast-list/.bower.json
Expand Up @@ -25,11 +25,11 @@
"dependencies": {
"dom-scheduler": "etiennesegonzac/dom-scheduler"
},
"_release": "be247eecf8",
"_release": "93168311a4",
"_resolution": {
"type": "branch",
"branch": "master",
"commit": "be247eecf867b01e402e59348ad277d5635f47ee"
"commit": "93168311a40562eda6b6a33a61cf2b45329d60bb"
},
"_source": "git://github.com/gaia-components/fast-list.git",
"_target": "master",
Expand Down
18 changes: 12 additions & 6 deletions apps/music/components/fast-list/fast-list-edit.js
Expand Up @@ -129,7 +129,6 @@ function fastListEdit(list) {
var li = ctx.item;
var touch = evt.touches && evt.touches[0] || evt;
var position = touch.pageY;

var delta = position - ctx.initialY;

list._rearrange(delta);
Expand All @@ -147,6 +146,8 @@ function fastListEdit(list) {
* @param {Number} delta the distance traveled by the reordering gesture
*/
list._rearrange = function(delta) {
debug('rearrange', delta);

var ctx = list.reorderingContext;
var upCount = ctx.moveUp.size;
var downCount = ctx.moveDown.size;
Expand All @@ -168,6 +169,8 @@ function fastListEdit(list) {
list.geometry,
list.els.itemsInDOM
);

debug('rearranged');
};

/**
Expand Down Expand Up @@ -271,22 +274,23 @@ function fastListEdit(list) {
};
}


/**
* Internals
*/

function resetTransform(item) {
debug('reset transform');
var position = parseInt(item.dataset.position);
item.style.webkitTransform =
item.style.transform = 'translate3d(0, ' + position + 'px, 0)';
item.style.transform = 'translateY(' + position + 'px)';
item.dataset.tweakDelta = '';
}

function tweakTransform(item, delta) {
var position = parseInt(item.dataset.position) + delta;
debug('tweak transform', delta);
var position = ~~item.dataset.position + delta;
item.style.webkitTransform =
item.style.transform = 'translate3d(0, ' + position + 'px, 0)';
item.style.transform = 'translateY(' + position + 'px)';
item.dataset.tweakDelta = delta;
}

Expand All @@ -297,6 +301,7 @@ function resetTransition(item) {

function tweakAndTransition(item, tweak) {
return schedule.feedback(function() {
debug('tweak and transition', item, tweak);
item.style.transition = 'transform 0.15s ease';
item.style.webkitTransition = '-webkit-transform 0.15s ease';
if (tweak === 0) {
Expand Down Expand Up @@ -372,6 +377,7 @@ function computeChanges(context, geometry, domItems, delta) {
}

function applyChanges(context, geometry, domItems) {
debug('apply changes');
if (!context.item) return Promise.resolve();

var itemHeight = geometry.itemHeight;
Expand Down Expand Up @@ -408,6 +414,7 @@ function applyChanges(context, geometry, domItems) {
}

function moveInPlace(context, geometry) {
debug('move in place');
var li = context.item;

// We're already in place
Expand All @@ -432,7 +439,6 @@ function moveInPlace(context, geometry) {
function on(el, name, fn) { el.addEventListener(name, fn); }
function off(el, name, fn) { el.removeEventListener(name, fn); }


});})((typeof define)[0]=='f'&&define.amd?define:(function(n,n2,w){'use strict';
return(typeof module)[0]=='o'?function(c){c(require,exports,module);}:
function(c){var m={exports:{}};c(function(n){w[n];},m.exports,m);
Expand Down

0 comments on commit 2f91717

Please sign in to comment.