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

Initial port of concentricity project #1

Merged
merged 5 commits into from
Nov 1, 2016
Merged

Conversation

cjwilliams
Copy link
Contributor

An initial attempt to port the existing concentricity watchface over to Rocky.js

Copy link

@orviwan orviwan left a comment

Choose a reason for hiding this comment

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

Looks great, just some optional alternatives.

var round = require('./round');
var rect = require('./rect');

function DrawCommand(platform) {
Copy link

Choose a reason for hiding this comment

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

Perhaps you could just require the relevant file based on platform.

if(rocky.watchInfo.platform === 'chalk') { //require round } else { //require rect }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The require is a directive to webpack to include a module in the bundled JS file. At bundling time, rocky.watchInfo.platform doesn't exist (it's an API accessible at runtime) and I'm not sure how webpack would handle this (maybe ignore it?)

this.minutes = round.drawMinutes;
this.seconds = round.drawSeconds;
}
if (['basalt', 'chalk', 'emery'].indexOf(platform) >= 0) {
Copy link

Choose a reason for hiding this comment

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

again here, it would be simpler to:
if (platform === 'diorite') { //bw } else { //color }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wish we had a color/bw attribute on watchinfo =(

@matthewtole matthewtole removed their assignment Oct 25, 2016
// Set the drawing color
ctx.fillStyle = color;

if (endAngle == 0) {
Copy link

Choose a reason for hiding this comment

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

if (endAngle === 0) {

@orviwan
Copy link

orviwan commented Nov 1, 2016

One minor comment, other than that LGTM! 👍

@cjwilliams cjwilliams merged commit 12e686b into master Nov 1, 2016
@cjwilliams cjwilliams deleted the initial-release branch November 1, 2016 21:42
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