Merge pull request #467 from sgomes/material-sprint-style-fixes
Style fixes across the material-sprint branch.
This commit is contained in:
commit
b035eae767
@ -19,6 +19,5 @@
|
|||||||
(function() {
|
(function() {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var querySelector = document.querySelector.bind(document);
|
// TODO: Do we still need this file?
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
function PaperButton(el) {
|
function PaperButton(el) {
|
||||||
var buttonElement = el;
|
var buttonElement = el;
|
||||||
var rippleElement = buttonElement.querySelector('.PaperButton-ripple');
|
var rippleElement = buttonElement.querySelector('.PaperButton-ripple');
|
||||||
var frameCount = 0, x, y;
|
var frameCount = 0;
|
||||||
|
var x;
|
||||||
|
var y;
|
||||||
|
|
||||||
if (rippleElement) {
|
if (rippleElement) {
|
||||||
var bound = buttonElement.getBoundingClientRect();
|
var bound = buttonElement.getBoundingClientRect();
|
||||||
@ -28,7 +30,8 @@ function PaperButton(el) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.setRippleXY = function(newX, newY) {
|
this.setRippleXY = function(newX, newY) {
|
||||||
x = newX, y = newY;
|
x = newX;
|
||||||
|
y = newY;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.animFrameHandler = function() {
|
this.animFrameHandler = function() {
|
||||||
@ -58,7 +61,8 @@ PaperButton.prototype.onClickHandler = function(evt) {
|
|||||||
|
|
||||||
this.setFrameCount(1);
|
this.setFrameCount(1);
|
||||||
var bound = evt.currentTarget.getBoundingClientRect();
|
var bound = evt.currentTarget.getBoundingClientRect();
|
||||||
var x, y;
|
var x;
|
||||||
|
var y;
|
||||||
// Check if we are handling a keyboard click
|
// Check if we are handling a keyboard click
|
||||||
if (event.clientX === 0 && event.clientY === 0) {
|
if (event.clientX === 0 && event.clientY === 0) {
|
||||||
x = Math.round(bound.width / 2);
|
x = Math.round(bound.width / 2);
|
||||||
|
@ -102,7 +102,6 @@
|
|||||||
sidenav.close();
|
sidenav.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
menuButton.addEventListener('click', function(evt) {
|
menuButton.addEventListener('click', function(evt) {
|
||||||
sidenav.toggle();
|
sidenav.toggle();
|
||||||
});
|
});
|
||||||
|
@ -27,9 +27,12 @@ function RadioButton(btnElement, labelElement) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
labelElement.addEventListener('click', this.onClick.bind(this));
|
labelElement.addEventListener('click', this.onClick.bind(this));
|
||||||
ripple.addEventListener('webkitTransitionEnd', this.onEndOfRippleTransition.bind(this));
|
ripple.addEventListener('webkitTransitionEnd',
|
||||||
ripple.addEventListener('oTransitionEnd', this.onEndOfRippleTransition.bind(this));
|
this.onEndOfRippleTransition.bind(this));
|
||||||
ripple.addEventListener('transitionEnd', this.onEndOfRippleTransition.bind(this));
|
ripple.addEventListener('oTransitionEnd',
|
||||||
|
this.onEndOfRippleTransition.bind(this));
|
||||||
|
ripple.addEventListener('transitionEnd',
|
||||||
|
this.onEndOfRippleTransition.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('load', function() {
|
window.addEventListener('load', function() {
|
||||||
|
@ -9,7 +9,8 @@ function TextField(element) {
|
|||||||
if (inputElement.hasAttribute('maxrows')) {
|
if (inputElement.hasAttribute('maxrows')) {
|
||||||
maxRows = parseInt(inputElement.getAttribute('maxrows'), 10);
|
maxRows = parseInt(inputElement.getAttribute('maxrows'), 10);
|
||||||
if (isNaN(maxRows)) {
|
if (isNaN(maxRows)) {
|
||||||
console.log('maxrows attribute provided, but wasn\'t a number: '+maxRows);
|
console.log(
|
||||||
|
'maxrows attribute provided, but wasn\'t a number: ' + maxRows);
|
||||||
maxRows = NO_MAX_ROWS;
|
maxRows = NO_MAX_ROWS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
app/styleguide/third_party/rAF.js
vendored
2
app/styleguide/third_party/rAF.js
vendored
@ -1,3 +1,5 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
// From: http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/
|
// From: http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/
|
||||||
// shim layer with setTimeout fallback
|
// shim layer with setTimeout fallback
|
||||||
window.requestAnimFrame = (function() {
|
window.requestAnimFrame = (function() {
|
||||||
|
@ -42,7 +42,7 @@ var AUTOPREFIXER_BROWSERS = [
|
|||||||
|
|
||||||
// Lint JavaScript
|
// Lint JavaScript
|
||||||
gulp.task('jshint', function() {
|
gulp.task('jshint', function() {
|
||||||
return gulp.src('app/scripts/**/*.js')
|
return gulp.src(['app/scripts/**/*.js', 'app/styleguide/**/*.js'])
|
||||||
.pipe(reload({stream: true, once: true}))
|
.pipe(reload({stream: true, once: true}))
|
||||||
.pipe($.jshint())
|
.pipe($.jshint())
|
||||||
.pipe($.jshint.reporter('jshint-stylish'))
|
.pipe($.jshint.reporter('jshint-stylish'))
|
||||||
@ -91,8 +91,7 @@ gulp.task('styles', function () {
|
|||||||
style: 'expanded',
|
style: 'expanded',
|
||||||
precision: 10
|
precision: 10
|
||||||
})
|
})
|
||||||
.on('error', console.error.bind(console))
|
.on('error', console.error.bind(console)))
|
||||||
)
|
|
||||||
.pipe($.autoprefixer(AUTOPREFIXER_BROWSERS))
|
.pipe($.autoprefixer(AUTOPREFIXER_BROWSERS))
|
||||||
.pipe(gulp.dest('.tmp'))
|
.pipe(gulp.dest('.tmp'))
|
||||||
// Concatenate And Minify Styles
|
// Concatenate And Minify Styles
|
||||||
|
Loading…
x
Reference in New Issue
Block a user