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

Address Code Review by NJ #16

Open
oslego opened this issue Jun 12, 2014 · 0 comments
Open

Address Code Review by NJ #16

oslego opened this issue Jun 12, 2014 · 0 comments
Assignees

Comments

@oslego
Copy link
Member

oslego commented Jun 12, 2014

CSSUtils.getContentBoxOf(): there’s a TODO here about not handling cases other than content-box. Will that affect anything?

Editor.setupEditorHolder(): the way it calls itself back is a bit confusing - it seems like it would be clearer to just reverse the condition (i.e. if (!this.holder), create the element, and then do the other stuff after the if).

Editor.setupShapeDecoration(): the check for whether the path isn't already an array could just be !Array.isArray(path), I think.

Editor.turnOnFreeTransform()/turnOffFreeTransform(): could just reverse the conditions

PolygonEditor/CircleEditor/EllipseEditor.setup(): it looks like the event listeners added at the end of these functions are never removed.

PolygonEditor.inferShapeFromElement(): there’s a TODO here about not dealing with non-px units - is that a potential problem (e.g. might people want to use shapes for boxes that are sized in ems/rems)?

PolygonEditor.onMouseDown(): when checking the vertex index, don’t need to parseInt() since you’ve already determined that the type is “number” (similar code you have later doesn’t do the parseInt())

EllipseEditor.parseShape(): there’s a TODO here for handling centers other than the default 50% 50% - is that something we’ll be likely to encounter?

@oslego oslego self-assigned this Jun 12, 2014
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

No branches or pull requests

1 participant