Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
If 'feature_limit' option is set to 0, then any drawn features disappear immediately. This is due to the 'event.feature.layer.removeFeatures' method call on 'featureadded' event type. Which in turn is due to the fact that 'behavior.feature_limit' is string, so has the bool value 'True'. Thus the condition (event.type == 'featureadded' && behavior.feature_limit && $(behavior.feature_limit < event.object.features.length)
is always performed for the corresponding operation.
Comment | File | Size | Author |
---|---|---|---|
#1 | ole-immediate_removal-2263331.patch | 694 bytes | yevhen |
Comments
Comment #1
yevhen CreditAttribution: yevhen commentedComment #2
DrupaListo.com CreditAttribution: DrupaListo.com commentedyou are right in principle:
"0" is a string, and since it's not empty, it's evaluated to true
but in current module version 7.x-1.1, the behavior.feature_limit is a js null value when the cck field cardinality is unlimited.
So this bug is not dangerous imho, but needs 1-2 mins thought from lead maintainer and then commit/skip and mark issue as wont fix/fixed.
Cheers.