Skip to content
This repository was archived by the owner on Feb 26, 2019. It is now read-only.
Open
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
2 changes: 1 addition & 1 deletion src/farbtastic.js
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ $._farbtastic = function (container, options) {
};

// Parse options.
if (!options.callback) {
if (!options.callback && !options.width) {
options = { callback: options };

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be handled differently. If there is no callback property than one should be defined rather than redefining options.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my case i have to initialize script with empty callback, set color and then link to callback. There is no way to set starting color if i don't use input field and i have to initialize with options because you can't set width otherwise. Maybe there should be a color option then?

}
options = $.extend({
Expand Down