Open
Conversation
added 7 commits
October 21, 2015 11:09
test(test/qrcode-spec.js): 添加测试用例 `设置二维码容错水平`
src/index.js
Outdated
Member
There was a problem hiding this comment.
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>;
Author
There was a problem hiding this comment.
@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 渲染算法
…o develop-3.0.6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
临时过渡版本,用于解决 canvas 不能渲染小数点像素值问题。