Skip to content

Commit

Permalink
update(plugin): re-map plugin options to scrollbar.options.plugin[name]
Browse files Browse the repository at this point in the history
  • Loading branch information
idiotWu committed Oct 19, 2017
1 parent b0eb669 commit 99f68e5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ export function initPlugins(
.map((pluginName: string) => {
const Plugin = globalPlugins.constructors[pluginName];

return new Plugin(scrollbar, options[pluginName]);
const instance = new Plugin(scrollbar, options[pluginName]);

// bind plugin options to `scrollbar.options`
options[pluginName] = instance.options;

return instance;
});
}

0 comments on commit 99f68e5

Please sign in to comment.