From 6ad7c7c15f7d9d23150ca7788de25c342b27a9ec Mon Sep 17 00:00:00 2001 From: Lukas Jakob Date: Sun, 18 Sep 2016 13:59:44 +0200 Subject: [PATCH 1/2] Add IDE .idea to gitignore. --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 746b3d7..2e8f5a9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ videos/* node_modules/* css/main.css -build/* \ No newline at end of file +build/* +.idea/* \ No newline at end of file From a5aa858482fe31f476e55de31f70f67696aa80de Mon Sep 17 00:00:00 2001 From: Lukas Jakob Date: Sun, 18 Sep 2016 14:03:41 +0200 Subject: [PATCH 2/2] Bugfix: Call public method loadVideo 'videoPath' argument not available. --- src/valiant.jquery.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/valiant.jquery.js b/src/valiant.jquery.js index baaaeff..6740519 100644 --- a/src/valiant.jquery.js +++ b/src/valiant.jquery.js @@ -507,6 +507,8 @@ three.js r65 or higher }; $.fn[pluginName] = function ( options ) { + // use pluginArguments instead of this.each arguments, otherwise Valiant360('loadVideo', 'path/to/video') path argument will be missing + var pluginArguments = arguments; return this.each(function () { if(typeof options === 'object' || !options) { // A really lightweight plugin wrapper around the constructor, @@ -516,8 +518,8 @@ three.js r65 or higher $.data(this, "plugin_" + pluginName, this.plugin); } } else if(this.plugin[options]) { - // Allows plugin methods to be called - return this.plugin[options].apply(this.plugin, Array.prototype.slice.call(arguments, 1)) + // Allows plugin methods to be called - use pluginArguments instead of this.each arguments + return this.plugin[options].apply(this.plugin, Array.prototype.slice.call(pluginArguments, 1)) } }); };