Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop 3.0.6 #26

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Develop 3.0.6 #26

wants to merge 15 commits into from

Conversation

WNLee
Copy link

@WNLee WNLee commented Oct 26, 2015

临时过渡版本,用于解决 canvas 不能渲染小数点像素值问题。

canvas.style.width = size + 'px';
canvas.style.height = size + 'px';
canvas.style.width = tileW * count + 'px';
canvas.style.height = tileH * count + 'px';
return canvas;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return的结果要做处理一下,比如

<div style="width:100px;height:100px;">
new qrcode({size:100});
</div>

当计算后canvas是90*90,码会偏在左上角,预期是剧中四边留白居中,居中计算组件要吃掉,调用方没法算

return <span width=size
        height=size
        padding-top=(size-canvas.width)/2 
        padding-left=(size-canvas.width)/2
        display=inline-block>
     <canvas/>
</span>;

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sehuo 是不是不要单纯输出 canvas,还要加上 span 做容器然后 canvas 在其中居中是吗?

叶言 added 8 commits November 1, 2015 21:47
修复不能渲染小数点像素值问题
fix(src/index.js): delete redundancy function `inPositionDetection`
test(test/qrcode-spec.js): 添加测试用例 `设置二维码容错水平`
改变 canvas 渲染算法
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants