- Welcome to the Kancolle Wiki!
- If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord
Changes
Jump to navigation
Jump to search
Line 83:
Line 83:
− +
− multiToggleStorage = MultiToggleStorage(target, property_default);
Line 96:
Line 95:
+
Create multiToggleStorage when we have a proper property_default
property_default = multi_toggle_element.data("default"),
property_default = multi_toggle_element.data("default"),
property_filter = multi_toggle_element.data("filter") || false, //Whether or not the multi toggle is a filter
property_filter = multi_toggle_element.data("filter") || false, //Whether or not the multi toggle is a filter
target = "multi-toggle-target-" + property,
target = "multi-toggle-target-" + property;
//make sure the states are an array.
//make sure the states are an array.
if (!property_states || !Array.isArray(property_states) || property_states.length < 1) {
if (!property_states || !Array.isArray(property_states) || property_states.length < 1) {
property_default = property_states[0];
property_default = property_states[0];
}
}
var multiToggleStorage = MultiToggleStorage(target, property_default);
//set the new state of the multi toggle.
//set the new state of the multi toggle.
if (selected && property_states.indexOf(selected) >= 0) {
if (selected && property_states.indexOf(selected) >= 0) {