normalize sampler and spa project structures

This commit is contained in:
Scott J. Miles
2014-11-03 11:17:27 -08:00
parent 464ab0a366
commit 28d4337f9a
6 changed files with 34 additions and 27 deletions

View File

@@ -14,6 +14,18 @@ console.perf = function() {
};
console.perfEnd = function() {
if (window.WebComponents) {
// TODO(sjmiles): we need some kind of 'whenReady' or other signal
// that will work if this function is called after the event has fired
addEventListener('WebComponentsReady', function() {
console._perfEnd();
});
} else {
console._perfEnd();
}
};
console._perfEnd = function() {
// force layout
document.body.offsetWidth;
var time = performance.now() - console.perf.time;

View File

@@ -2,19 +2,17 @@
<html>
<head>
<script src="../../webcomponentsjs/HTMLImports.js"></script>
<script src="../../webcomponentsjs/CustomElements.js"></script>
<script src="../../../../perf-lib/perf.js"></script>
<script src="../../perf-lib/perf.js"></script>
<title>Sampler</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="import" href="x-app.html">
<link rel="import" href="../../assets/icons.html">
<link rel="import" href="src/x-app.html">
<link rel="import" href="assets/icons.html">
<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.13.2/TweenMax.min.js"></script>
<style>

View File

@@ -10,7 +10,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="import" href="x-app.html">
<link rel="import" href="src/x-app.html">
<link rel="import" href="assets/icons.html">
@@ -30,11 +30,7 @@
<x-app flex></x-app>
<script>
addEventListener('WebComponentsReady', function() {
console.perfEnd();
});
</script>
<script>console.perfEnd();</script>
</body>
</html>

View File

@@ -2,19 +2,21 @@
<html>
<head>
<script src="../../perf-lib/perf.js"></script>
<script src="../../webcomponentsjs/HTMLImports.js"></script>
<script src="../../webcomponentsjs/CustomElements.js"></script>
<script src="../../../../perf-lib/perf.js"></script>
<title>Sampler</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="import" href="x-app.html">
<link rel="import" href="src/x-app.html">
<link rel="import" href="assets/icons.html">
<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.13.2/TweenMax.min.js"></script>
<!-- <script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.13.2/TweenMax.min.js"></script> -->
<style>
body {
font-family: sans-serif;

View File

@@ -1,5 +1,5 @@
<link rel="import" href="../../polymer/polymer.html">
<link rel="import" href="../../elements/elements.html">
<link rel="import" href="../../../polymer/polymer.html">
<link rel="import" href="../../../elements/elements.html">
<style>
@@ -174,10 +174,11 @@
},
panelClick: function() {
return;
/*
TweenLite.to(this.$.panel, 0.4, {
marginTop: '-800px'
});
*/
},
scrollerScroll: function() {

View File

@@ -28,9 +28,7 @@
<x-app flex></x-app>
<script>
addEventListener('WebComponentsReady', function() {
console.perfEnd();
});
console.perfEnd();
</script>
</body>