diff options
Diffstat (limited to 'src/mbgl/style/layers/background_layer.cpp')
-rw-r--r-- | src/mbgl/style/layers/background_layer.cpp | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/src/mbgl/style/layers/background_layer.cpp b/src/mbgl/style/layers/background_layer.cpp index f2e85ce7e7..417d288107 100644 --- a/src/mbgl/style/layers/background_layer.cpp +++ b/src/mbgl/style/layers/background_layer.cpp @@ -42,34 +42,6 @@ std::unique_ptr<Layer> BackgroundLayer::cloneRef(const std::string& id_) const { void BackgroundLayer::Impl::stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer>&) const { } - -// Visibility - -void BackgroundLayer::setVisibility(VisibilityType value) { - if (value == getVisibility()) - return; - auto impl_ = mutableImpl(); - impl_->visibility = value; - baseImpl = std::move(impl_); - observer->onLayerChanged(*this); -} - -// Zoom range - -void BackgroundLayer::setMinZoom(float minZoom) { - auto impl_ = mutableImpl(); - impl_->minZoom = minZoom; - baseImpl = std::move(impl_); - observer->onLayerChanged(*this); -} - -void BackgroundLayer::setMaxZoom(float maxZoom) { - auto impl_ = mutableImpl(); - impl_->maxZoom = maxZoom; - baseImpl = std::move(impl_); - observer->onLayerChanged(*this); -} - // Layout properties @@ -294,5 +266,9 @@ optional<Error> BackgroundLayer::setLayoutProperty(const std::string& name, cons return Error { "layer doesn't support this property" }; } +Mutable<Layer::Impl> BackgroundLayer::mutableBaseImpl() const { + return staticMutableCast<Layer::Impl>(mutableImpl()); +} + } // namespace style } // namespace mbgl |