Commit 857fd698 by doszhang

dos

parent 3504d536
......@@ -102,7 +102,6 @@ $(document).ready(function () {
img = loadedImages[window.base_resource_url + '/image2/cover/1.png'];
canvas2 = canvas;
ctx2 = ctx;
ctx2.scale(2, 2);
} else {
var id = images.length - 1 - firstSwiper.realIndex;
img = images[id];
......@@ -135,6 +134,7 @@ $(document).ready(function () {
ctx2.textAlign = 'left';
ctx2.textBaseline = 'top';
var left = (img.width - ctx2.measureText(text).width) / 2;
alert(left)
ctx2.shadowBlur = 0;
ctx2.fillText(text, left, top * 2);
$('.page:visible').find('.showBox').show().html('<img src="' + canvas2.toDataURL('image/png') + '">');
......
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