Skip to content

Commit

Permalink
Published privated attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
josex2r committed Nov 6, 2014
1 parent d53a701 commit 8543698
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 22 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jQuery-SlotMachine",
"description": "A simple jQuery plugin to make slot machine animation effect",
"version": "2.0.6",
"version": "2.0.7",
"keywords": [
"slots",
"gambling",
Expand Down
14 changes: 5 additions & 9 deletions dist/jquery.slotmachine.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! SlotMachine - v2.0.6 - 2014-11-06
/*! SlotMachine - v2.0.7 - 2014-11-06
* https://github.com/josex2r/jQuery-SlotMachine
* Copyright (c) 2014 Jose Luis Represa; Licensed MIT */
;(function($, window, document, undefined){
Expand Down Expand Up @@ -186,7 +186,7 @@
this._oncompleteStack = [ this.settings.complete ];
//Number of spins left before stop
this._spinsLeft = null;
//Number of spins left before stop
//Future result
this.futureActive = null;
//Machine is running?
this.isRunning = false;
Expand Down Expand Up @@ -394,6 +394,8 @@
this.futureActive = rnd;
}

/*if(this.$slot.attr("id")==="machine1")
console.log(this.futureActive)*/
//Decreasing spin
if(typeof spins === 'number'){
//Change delay and speed
Expand Down Expand Up @@ -537,13 +539,7 @@
var machine;
if ( !$.data(element[0], 'plugin_' + pluginName) ){
machine = new SlotMachine(element, options);
var publicObject = {};
for(var name in machine){
if(!name.match(/^_.+$/)){
publicObject[name] = machine[name];
}
}
$.data(element[0], 'plugin_' + pluginName, publicObject);
$.data(element[0], 'plugin_' + pluginName, machine);
}else{
machine = $.data(element[0], 'plugin_' + pluginName);
}
Expand Down
4 changes: 2 additions & 2 deletions dist/jquery.slotmachine.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
@@ -1,6 +1,6 @@
{
"name": "jquery-slotmachine",
"version": "2.0.6",
"version": "2.0.7",
"engines": {
"node": ">= 0.8.0"
},
Expand Down
2 changes: 1 addition & 1 deletion slotmachine.jquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"winning",
"machine"
],
"version": "2.0.6",
"version": "2.0.7",
"download": "https://github.com/josex2r/jQuery-SlotMachine",
"homepage": "https://github.com/josex2r/jQuery-SlotMachine",
"demo": "http://josex2r.github.io/jQuery-SlotMachine/",
Expand Down
12 changes: 4 additions & 8 deletions src/jquery.slotmachine.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
this._oncompleteStack = [ this.settings.complete ];
//Number of spins left before stop
this._spinsLeft = null;
//Number of spins left before stop
//Future result
this.futureActive = null;
//Machine is running?
this.isRunning = false;
Expand Down Expand Up @@ -398,6 +398,8 @@
this.futureActive = rnd;
}

/*if(this.$slot.attr("id")==="machine1")
console.log(this.futureActive)*/
//Decreasing spin
if(typeof spins === 'number'){
//Change delay and speed
Expand Down Expand Up @@ -541,13 +543,7 @@
var machine;
if ( !$.data(element[0], 'plugin_' + pluginName) ){
machine = new SlotMachine(element, options);
var publicObject = {};
for(var name in machine){
if(!name.match(/^_.+$/)){
publicObject[name] = machine[name];
}
}
$.data(element[0], 'plugin_' + pluginName, publicObject);
$.data(element[0], 'plugin_' + pluginName, machine);
}else{
machine = $.data(element[0], 'plugin_' + pluginName);
}
Expand Down

0 comments on commit 8543698

Please sign in to comment.