Commit b695a72b by doszhang

dos

parent cd32289d
...@@ -52,7 +52,7 @@ var canvas = false, ...@@ -52,7 +52,7 @@ var canvas = false,
$(document).ready(function () { $(document).ready(function () {
if ($('.page').height() < document.documentElement.clientHeight) { if ($('.page').height() < document.documentElement.clientHeight) {
var scale = document.documentElement.clientHeight / $('.page').height(); var scale = document.documentElement.clientHeight / $('.page').height();
$('.page').height() = document.documentElement.clientHeight $('.page').height(document.documentElement.clientHeight)
$('.bg').css({ $('.bg').css({
'transform': 'scale(1,' + scale + ')' 'transform': 'scale(1,' + scale + ')'
}); });
...@@ -66,8 +66,7 @@ $(document).ready(function () { ...@@ -66,8 +66,7 @@ $(document).ready(function () {
$('input[type=text]').on('focus', function () { $('input[type=text]').on('focus', function () {
$('.inputTip').hide(); $('.inputTip').hide();
// $('.start').hide(); // $('.start').hide();
}) }) $('input[type=text]').on('blur', function () {
$('input[type=text]').on('blur', function () {
window.scrollTo(0, 0); window.scrollTo(0, 0);
if ($.trim($(this).val()) === '') { if ($.trim($(this).val()) === '') {
$('.inputTip').show(); $('.inputTip').show();
...@@ -76,8 +75,7 @@ $(document).ready(function () { ...@@ -76,8 +75,7 @@ $(document).ready(function () {
$('.inputTip').hide(); $('.inputTip').hide();
// $('.start').show(); // $('.start').show();
} }
}) }) $('.again').on('click', function () {
$('.again').on('click', function () {
$('.swiperBox,.make,.username,.upload').show(); $('.swiperBox,.make,.username,.upload').show();
$('.again,.saveTip').hide(); $('.again,.saveTip').hide();
$('.inputTip').show(); $('.inputTip').show();
...@@ -86,8 +84,7 @@ $(document).ready(function () { ...@@ -86,8 +84,7 @@ $(document).ready(function () {
ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = "#ffffff"; ctx.fillStyle = "#ffffff";
ctx.fillRect(0, 0, canvas.width, canvas.height); ctx.fillRect(0, 0, canvas.width, canvas.height);
}) }) $('.make').on('click', function () {
$('.make').on('click', function () {
if (!inited) { if (!inited) {
return; return;
} }
...@@ -151,27 +148,22 @@ $(document).ready(function () { ...@@ -151,27 +148,22 @@ $(document).ready(function () {
ctx2.fillText(text, left, top * 2); ctx2.fillText(text, left, top * 2);
$('.page:visible').find('.showBox').show().html('<img src="' + canvas2.toDataURL('image/png') + '">'); $('.page:visible').find('.showBox').show().html('<img src="' + canvas2.toDataURL('image/png') + '">');
}); });
}) }) $('input[type=text]').on('input', onInput);
$('input[type=text]').on('input', onInput);
$('.L-arrow').on('click', function () { $('.L-arrow').on('click', function () {
if (firstSwiper) { if (firstSwiper) {
firstSwiper.slideNext(); firstSwiper.slideNext();
} }
}) }) $('.R-arrow').on('click', function () {
$('.R-arrow').on('click', function () {
if (firstSwiper) { if (firstSwiper) {
firstSwiper.slidePrev(); firstSwiper.slidePrev();
} }
}) }) $('.choose1').on('click', function () {
$('.choose1').on('click', function () {
showPage1(); showPage1();
}) }) $('.choose2').on('click', function () {
$('.choose2').on('click', function () {
$('.upload').show(); $('.upload').show();
$('.imgTip').find('canvas').hide(); $('.imgTip').find('canvas').hide();
showPage2(); showPage2();
}) }) $('input[type=file]').on('change', function () {
$('input[type=file]').on('change', function () {
$('.imgTip').find('canvas').show(); $('.imgTip').find('canvas').show();
$('.usertips').show(); $('.usertips').show();
imgInfo = { imgInfo = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment