Permalink
Browse files

Less ugly and less obtrusive Slider wait control.

I've always hated it. Now should only appear if the next page is
actually taking a while to set (because it has a slight transition on
the opacity, so near-zero setPage times shouldn't ever let the opacity
reach 1). Need to test this on slower devices.
  • Loading branch information...
1 parent 7330202 commit 32c2502e875f839a5f297002e1300f3bad8a330a @joseph joseph committed Oct 9, 2011
Showing with 10 additions and 8 deletions.
  1. +3 −3 src/flippers/slider.js
  2. +7 −5 styles/monocore.css
View
@@ -199,7 +199,7 @@ Monocle.Flippers.Slider = function (reader) {
checkPoint(boxPointX);
p.turnData.releasing = true;
- showWaitControl(lowerPage());
+ //showWaitControl(lowerPage());
if (dir == k.FORWARDS) {
if (
@@ -462,13 +462,13 @@ Monocle.Flippers.Slider = function (reader) {
function showWaitControl(page) {
var ctrl = p.reader.dom.find('flippers_slider_wait', page.m.pageIndex);
- ctrl.style.visibility = "visible";
+ ctrl.style.opacity = 1;
}
function hideWaitControl(page) {
var ctrl = p.reader.dom.find('flippers_slider_wait', page.m.pageIndex);
- ctrl.style.visibility = "hidden";
+ ctrl.style.opacity = 0;
}
// THIS IS THE CORE API THAT ALL FLIPPERS MUST PROVIDE.
View
@@ -91,11 +91,13 @@ div.monelem_controls_panel_expanded {
div.monelem_flippers_slider_wait {
position: absolute;
- right: 2px;
- top: 2px;
- width: 20px;
- height: 20px;
+ right: 0;
+ top: 0;
+ width: 24px;
+ height: 24px;
background-repeat: no-repeat;
+ -webkit-transition: opacity 100ms ease-out 0ms;
+ -moz-transition: opacity 100ms ease-out 0ms;
}
@@ -111,5 +113,5 @@ div.monelem_panels_imode_toggleIcon {
}
div.monelem_flippers_slider_wait {
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABj0lEQVR42rXUu0uCURjHcaEyiCiJBmkQHEJHQboNITiE1OiSCA0NEkRIUhQtJhQkFpFLS9CFkiK6DZG5iLk0BA1B0FgRNNcf8PZ94LzyYl7K7MCHc57nnPfHOQ6aNE2rq7oHlhyhUMiBCaxhHQvwodFwxo4k8tiE7VugNNVmGhuYQQBzqveKcXjxARlORJCSQGNYL04QhqXMzV24wgP6ii5yXQikaMEbhqQuEzaPDJ7VnECT2luRWgKlaMAhwrJZIfATYZlVnYYfKezBogfacWuqMtRvtwOfqv24wzLM0tMDZxEz%2FXLIjfAOt9TGwDj80qgh9AVjah3AkSzOEawxMIs8DpCDS5pLfwi8wCCG0a4%2FeRTJGsJsuESzBAk90IpTOPXDiURCy2QyI3DE43FN5mg0KvO0ITCGRWMYCptT2NcPy4d6ICbBTE1fne%2FBDazlAluxjS10VHmqB%2FfwSl0ysOgZjwiizdA3w41VnMEj%2FUqBxtB%2B7OIJWRwjp9YRdMq5HwcW3aobA%2Bgqc%2Bz%2F%2F7G%2FAORsH%2Flqgs9VAAAAAElFTkSuQmCC);
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAA8UlEQVRIibXVSw6DIBAGYBSw8bXxDh7HrWfo%2FTyO5%2Bii4KMzRqyxtAUcJzGjEPzyB4zRPM9Ma53DVa69wF5V1R3mknEck2masMu1L9cwDMs4dpwzY7DmVte1ZFBCCB4hgGVDsMOiQim1jeGzuYfxYvecmfXwurJpmixN00SwtaSUD0ZUgLCu61jbtm%2FgCqTv%2B1wcJyiROI6fHwAlwjnXVoAKAcCegAqBY%2Fo9AQUCCdRf4AziDIQiXkAI8vMUUSDeCXwR%2BNDCAFckOIErciqBCxK0yT4IJth%2BOBRl%2B2mRJDBlS0IK2BBy4IhcAuwR0k221QvAw70dDKov9QAAAABJRU5ErkJggg%3D%3D);
}

0 comments on commit 32c2502

Please sign in to comment.