Commit 6aa694af authored by Jörg Richter's avatar Jörg Richter

Model: add `hasVisibleObject()` to `Topicmap`

See dmx-platform/dmx-platform#305
parent f6271c61
Pipeline #8478 passed with stage
in 2 seconds
This diff is collapsed.
......@@ -6,7 +6,7 @@ import typeCache from './type-cache'
import permCache from './permission-cache'
import utils from './utils'
console.log('[DMX] Client API 2019/11/05')
console.log('[DMX] Client API 2019/11/11')
export default {
......
......@@ -711,6 +711,11 @@ class Topicmap extends Topic {
return this.hasTopic(id) || this.hasAssoc(id)
}
hasVisibleObject (id) {
const o = this.getTopicIfExists(id) || this.getAssocIfExists(id)
return o && o.isVisible()
}
/**
* @return all topics of this topicmap, including hidden ones (array of dm5.ViewTopic)
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment