Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Legend() : ComponentBase() {
NONE,

/**
* Do not draw the a form, but leave space for it
* Do not draw the form, but leave space for it
*/
EMPTY,

Expand Down Expand Up @@ -71,14 +71,14 @@ class Legend() : ComponentBase() {
/**
* The legend entries array
*/
var entries: Array<LegendEntry> = arrayOf<LegendEntry>()
var entries: Array<LegendEntry> = arrayOf()
private set

/**
* Entries that will be appended to the end of the auto calculated entries after calculating the legend.
* (if the legend has already been calculated, you will need to call notifyDataSetChanged() to let the changes take effect)
*/
var extraEntries: Array<LegendEntry> = arrayOf<LegendEntry>()
var extraEntries: Array<LegendEntry> = arrayOf()
private set

/**
Expand Down Expand Up @@ -217,8 +217,8 @@ class Legend() : ComponentBase() {
var max = 0f

for (entry in this.entries) {
val label = entry.label
if (label == null) continue
if (entry == null) continue
val label = entry.label ?: continue

val length = p.calcTextHeight(label).toFloat()

Expand Down
Loading