jdee / violation Goto Github PK
View Code? Open in Web Editor NEWViolation for iOS
Violation for iOS
The innerRadius property is not validated. It should be restricted to the open range (0.0,MIN(bounds.size.width, bounds.size.height)), or perhaps even to a smaller open range (a, b), where a >= 0.0, b <= MIN(bounds.size.width, bounds.size.height).
See also issue #1. Assuming innerRadius becomes innerRadiusProportion, it should be
limited to (a, b) where a >= 0, b <= 1.
Either way, validation is required.
The innerRadius property is currently interpreted as an absolute size, in points. The problem is that changing the size of the control bounds will not scale the innerRadius. It's possible, in fact, to set the frame size smaller than the innerRadius, though this is more of a validation problem.
It's probably best to change innerRadius to innerRadiusProportion or innerRadiusRatio. The inner radius will be
innerRadiusProportion*MIN(bounds.size.width, bounds.size.height)*0.5.
Then resizing the image will produce a scaled image with the same proportions.
It's not entirely clear how to do this. See this thread in the Apple dev forums: https://devforums.apple.com/message/971277. Once I learn the right thing to do, I'll update the repo.
It seems likely that the end result will be a dynamic library instead of a static one, but that remains to be seen.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.