Skip to content

nathan-sharmarke-bret#11

Open
nharren wants to merge 38 commits intocodefellows-javascript-401d17:masterfrom
nharren:master
Open

nathan-sharmarke-bret#11
nharren wants to merge 38 commits intocodefellows-javascript-401d17:masterfrom
nharren:master

Conversation

@nharren
Copy link
Copy Markdown

@nharren nharren commented Jul 24, 2017

No description provided.

nharren and others added 30 commits July 20, 2017 12:46
@nharren nharren changed the title autobots nathan-sharmarke-bret Jul 24, 2017
while (transforms.length > 0) {
let transform = transforms.shift();
let transformParts = transform.split(':');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

while this switch statement works for what you are accomplishing another way to handle this that would only take up a single line of code and would keep it from growing out of control if you had 100+ transformations would be to access the property of the object. So instead of passing in a string of bw or hflip you could pass in the name of the property and just access the bitmapproperty. For the items with parameters you can have another variable you pass in to bitmapproperty and on the ones that don't need the parameter you can ignore it as they won't accept a parameter anyway.

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.

4 participants