-
Notifications
You must be signed in to change notification settings - Fork 75
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
Add a visible() and selectionAPI() functions to layers. #682
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -339,13 +339,14 @@ var pixelmapFeature = function (arg) { | |
m_quadFeature = m_this.layer().createFeature('quad', { | ||
selectionAPI: false, | ||
gcs: m_this.gcs(), | ||
visible: m_this.visible() | ||
visible: m_this.visible(undefined, true) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it would have been nice to just call it like m_this.visible(true). Should we switch the args placeholder? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. but that means that the user would have to provide answer to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The user just uses There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Roger that, on the same page. |
||
}); | ||
m_this.dependentFeatures([m_quadFeature]); | ||
m_quadFeature.style({image: m_info.canvas, | ||
position: m_this.style.get('position')}) | ||
.data([{}]) | ||
.draw(); | ||
m_quadFeature.style({ | ||
image: m_info.canvas, | ||
position: m_this.style.get('position')}) | ||
.data([{}]) | ||
.draw(); | ||
} | ||
/* If we prepared the pixelmap and rendered it, send a prepared event */ | ||
if (prepared) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use of direct in two different ways is little confusing but I see a reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
direct
is only ever passed internally -- the user should never have to reference it. It is only so we know what the base visibility of a feature is regardless of the layer.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right but I could see a use-case (perhaps more complicated) where a user would like to know the visible state of a feature not w.r.t to its parent. But I agree that most likely they would just query the state w.r.t parent.