Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes MeasureToolbarMode a subtype of MeasureToolbar #39

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
21 changes: 11 additions & 10 deletions Toolkit/ArcGISToolkit/MeasureToolbar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,6 @@ class MeasureResultView : UIView{

}

private enum MeasureToolbarMode{
case length
case area
case feature
}

public class MeasureToolbar: UIToolbar, AGSGeoViewTouchDelegate {


Expand Down Expand Up @@ -227,7 +221,14 @@ public class MeasureToolbar: UIToolbar, AGSGeoViewTouchDelegate {
private var leftHiddenPlaceholderView : UIView!
private var segControl : UISegmentedControl!
private var segControlItem : UIBarButtonItem!
private var mode : MeasureToolbarMode? = nil {

private enum Mode {
case length
case area
case feature
}

private var mode: Mode? = nil {
didSet {
guard mode != oldValue else { return }
updateMeasurement()
Expand Down Expand Up @@ -410,7 +411,7 @@ public class MeasureToolbar: UIToolbar, AGSGeoViewTouchDelegate {

private func startLineMode(){

guard mode != MeasureToolbarMode.length else{
guard mode != .length else {
return
}

Expand All @@ -426,7 +427,7 @@ public class MeasureToolbar: UIToolbar, AGSGeoViewTouchDelegate {

private func startAreaMode(){

guard mode != MeasureToolbarMode.area else{
guard mode != .area else {
return
}

Expand All @@ -442,7 +443,7 @@ public class MeasureToolbar: UIToolbar, AGSGeoViewTouchDelegate {

private func startFeatureMode(){

guard mode != MeasureToolbarMode.feature else{
guard mode != .feature else {
return
}

Expand Down