Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions chrome/iso.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.ic-toggle {
position: relative;
top: 10px;
top: 0px;
right: 10px;
float: right;
margin-left: 20px;
Expand Down Expand Up @@ -98,9 +98,6 @@

.ic-contributions-wrapper {
position: relative;
border-top: solid 1px #d8d8d8;
border-right: solid 1px #d8d8d8;
border-left: solid 1px #d8d8d8;
}

/*
Expand Down
20 changes: 8 additions & 12 deletions chrome/iso.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified firefox/isometric-contributions.xpi
Binary file not shown.
5 changes: 1 addition & 4 deletions firefox/isometric-contributions/iso.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.ic-toggle {
position: relative;
top: 10px;
top: 0px;
right: 10px;
float: right;
margin-left: 20px;
Expand Down Expand Up @@ -98,9 +98,6 @@

.ic-contributions-wrapper {
position: relative;
border-top: solid 1px #d8d8d8;
border-right: solid 1px #d8d8d8;
border-left: solid 1px #d8d8d8;
}

/*
Expand Down
20 changes: 8 additions & 12 deletions firefox/isometric-contributions/iso.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions safari/isometric-contributions.safariextension/iso.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.ic-toggle {
position: relative;
top: 10px;
top: 0px;
right: 10px;
float: right;
margin-left: 20px;
Expand Down Expand Up @@ -98,9 +98,6 @@

.ic-contributions-wrapper {
position: relative;
border-top: solid 1px #d8d8d8;
border-right: solid 1px #d8d8d8;
border-left: solid 1px #d8d8d8;
}

/*
Expand Down
20 changes: 8 additions & 12 deletions safari/isometric-contributions.safariextension/iso.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 7 additions & 12 deletions src/iso.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,16 @@ class Iso

initUI: ->
($ '<div class="ic-contributions-wrapper"></div>')
.insertBefore '#contributions-calendar'
($ '<canvas id="isometric-contributions" width="728" height="470"></canvas>')
.insertBefore ($ '.js-calendar-graph')
($ '<canvas id="isometric-contributions" width="720" height="470"></canvas>')
.appendTo '.ic-contributions-wrapper'

contributionsBox = (($ '#contributions-calendar').closest '.boxed-group')
insertLocation = (($ '#contributions-calendar').closest '.boxed-group').find 'h3'

toggleClass = ''
# Check for lock octicon
if ((contributionsBox.closest '.box').find '.box-header .octicon-lock').length
toggleClass = 'ic-with-lock'
contributionsBox = ($ '.js-contribution-graph')
insertLocation = ($ '.js-contribution-graph').find 'h2'

# Inject toggle
htmlToggle = """
<span class="ic-toggle #{toggleClass}">
<span class="ic-toggle">
<a href="#" class="ic-toggle-option tooltipped tooltipped-nw squares" data-ic-option="squares" aria-label="Normal chart view"></a>
<a href="#" class="ic-toggle-option tooltipped tooltipped-nw cubes" data-ic-option="cubes" aria-label="Isometric chart view"></a>
</span>
Expand Down Expand Up @@ -254,14 +249,14 @@ class Iso
($ html).appendTo $ '.ic-contributions-wrapper'

renderIsometricChart: ->
SIZE = 12
SIZE = 10
GH_OFFSET = 13
MAX_HEIGHT = 100

canvas = document.getElementById 'isometric-contributions'

# create pixel view container in point
point = new obelisk.Point 87, 100
point = new obelisk.Point 110, 110
pixelView = new obelisk.PixelView canvas, point

contribCount = null
Expand Down