Comments (1)
正常情况下
- 前端的坐标是以左上角来计算的,这毫无问题
和服务器储存的坐标信息对比,你会发现:
- X轴的坐标信息是对的(Dx <= fontendX <= Dx+Width),这毫无问题
- Y轴的坐标信息是错的,前端的Y轴坐标小于了后端的Y轴开始坐标,也就是(fontendY <= Dy <= Dy_Height),你肯定会很紧张,以为自己算错了
把心放肚子里
- 这是因为文字的坐标是以文字的左下角为原点的,也就是说服务端储存的Dy值已经是加上了Height之后的值了
- 前端不需要任何处理,后端会在比对的时候自动减去Height值再进行比对,也就是(Dy - Height)≈ fontendY
- 所以放心大胆的把这个看起来错误的Y值传给服务器,它会自己处理的
嘿,v2 版本即将更新,坐标会有所变化哟 _
from go-captcha.
Related Issues (10)
- 大佬,求教一下校验的方法,文档中貌似少了怎么校验? HOT 1
- capt.SetRangCheckTextLen 判断条件与变量名存在误导 HOT 2
- 怎么设置字段出现概率,现在刷新好几次都没有出现缩略图内字段 HOT 5
- 是否考虑加入更多验证方式 HOT 3
- 我做了一个Angular版本的示例代码 HOT 1
- 文档再完善些,示例再精简些 HOT 1
- go-captcha-example 启动后验证失败 HOT 1
- 设置字符集为英文字母时,验证容易报错 HOT 1
- There is a problem with the order of return variables in the comment HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-captcha.