Skip to content

Commit

Permalink
User can now control margin (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartmemo authored Oct 1, 2020
1 parent ec36e2f commit ab5813b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "qwerty-hancock",
"main": "dist/qwerty-hancock.js",
"version": "0.7.0",
"version": "0.7.1",
"homepage": "http://stuartmemo.com/qwerty-hancock/",
"authors": [
{
Expand Down
1 change: 1 addition & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ <h2>Need help or have an idea to make QH better?</h2>
width: 600,
height: 150,
startNote: 'A2',
margin: 'auto',
whiteNotesColour: '#fff',
blackNotesColour: '#000',
borderColour: '#000',
Expand Down
7 changes: 4 additions & 3 deletions dist/qwerty-hancock.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Qwerty Hancock keyboard library v0.7.0
* Qwerty Hancock keyboard library v0.7.1
* The web keyboard for now people.
* Copyright 2012-20, Stuart Memo
*
Expand All @@ -15,7 +15,7 @@
* In node context (browserify), `this` is the node global.
*/
var globalWindow = typeof global === 'undefined' ? root : root.window;
var version = '0.7.0',
var version = '0.7.1',
settings = {},
mouse_is_down = false,
keysDown = {},
Expand Down Expand Up @@ -68,6 +68,7 @@
octaves: user_settings.octaves || 3,
width: user_settings.width,
height: user_settings.height,
margin: user_settings.margin || 0,
startNote: user_settings.startNote || 'A3',
whiteKeyColour: user_settings.whiteKeyColour || '#fff',
blackKeyColour: user_settings.blackKeyColour || '#000',
Expand Down Expand Up @@ -258,7 +259,7 @@
el.style.padding = 0;
el.style.position = 'relative';
el.style.listStyle = 'none';
el.style.margin = 0;
el.style.margin = settings.margin;
el.style.width = settings.width + 'px';
el.style['-webkit-user-select'] = 'none';
el.style.boxSizing = 'content-box';
Expand Down
4 changes: 2 additions & 2 deletions dist/qwerty-hancock.min.js

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "qwerty-hancock",
"title": "Qwerty Hancock",
"description": "An interactive HTML plugin-free keyboard for your web audio project.",
"version": "0.7.0",
"version": "0.7.1",
"main": "dist/qwerty-hancock.js",
"repository": {
"type": "git",
Expand Down
7 changes: 4 additions & 3 deletions src/qwerty-hancock.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Qwerty Hancock keyboard library v0.7.0
* Qwerty Hancock keyboard library v0.7.1
* The web keyboard for now people.
* Copyright 2012-20, Stuart Memo
*
Expand All @@ -15,7 +15,7 @@
* In node context (browserify), `this` is the node global.
*/
var globalWindow = typeof global === 'undefined' ? root : root.window;
var version = '0.7.0',
var version = '0.7.1',
settings = {},
mouse_is_down = false,
keysDown = {},
Expand Down Expand Up @@ -68,6 +68,7 @@
octaves: user_settings.octaves || 3,
width: user_settings.width,
height: user_settings.height,
margin: user_settings.margin || 0,
startNote: user_settings.startNote || 'A3',
whiteKeyColour: user_settings.whiteKeyColour || '#fff',
blackKeyColour: user_settings.blackKeyColour || '#000',
Expand Down Expand Up @@ -258,7 +259,7 @@
el.style.padding = 0;
el.style.position = 'relative';
el.style.listStyle = 'none';
el.style.margin = 0;
el.style.margin = settings.margin;
el.style.width = settings.width + 'px';
el.style['-webkit-user-select'] = 'none';
el.style.boxSizing = 'content-box';
Expand Down

0 comments on commit ab5813b

Please sign in to comment.