-
Notifications
You must be signed in to change notification settings - Fork 4
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
Added BackgroundLayer model #581
base: develop
Are you sure you want to change the base?
Conversation
a8e3097
to
2a5fa70
Compare
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.
Где-то должна быть загрузка подложек в роуте edit-map
@@ -161,10 +161,6 @@ export default EditFormRoute.extend({ | |||
let hierarchy = this.sortLayersByIndex(rootLayers); | |||
model.set('hierarchy', hierarchy); | |||
|
|||
let backgroundLayers = Ember.A(); |
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.
тут весь этот метод был добавлен для того чтобы подложки была возможность отфильтровать - посмотри ПР где он добавлен, и убери его совсем.
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.
Исправлено
addon/routes/edit-map.js
Outdated
|
||
this.setLayerCategories(model, layers); | ||
this.getBackgroundLayers().then(backgroundLayers => controller.set('backgroundLayers', backgroundLayers)); |
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.
при вычитке модели должны вычитываться, и там же проставлятся в свойство, и должно ждать пока не вычитаются
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.
Исправлено
boundingBox: { | ||
__caption__: 'boundingBox' | ||
}, | ||
securityKey: { |
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.
это поле мне кажется тут не надо
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.
Исправлено
if (!Ember.isNone(layersInTree)) { | ||
layersInTree.addObject(mapLayer); | ||
} | ||
} | ||
|
||
let rootArray = this.get('mapLayer'); |
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.
а как оно теперь в дерево слоев попадает? Дерево слоев по идее в model.hierarchy
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.
Раньше дерево слоев лежало в model.otherlayers (отфильтрованные слои из model.hierarchy по canbebackground=false), подложки в model.backgroundLayers. Сейчас дерево слоев - это model.hierarchy, так как все слои с canbebackground=false удалены.
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.
об этом и пишу. Надо сделать чтоб добавлялось в model.hierarchy
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.
Они попадают же в дерево слоев?
ember-flexberry-gis/addon/mixins/flexberry-map-model-api-cosmos.js
Lines 182 to 183 in 92782da
const layers = this.get('hierarchy'); | |
layers.addObject(mapLayer); |
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.
все ок, я проглядела эту строчку
let secondaryParentLayerPath = primaryParentLayerPath.indexOf('hierarchy') !== -1 ? 'model.otherLayers' : 'model.hierarchy'; | ||
let backgroundLayerPath = 'model.backgroundLayers'; | ||
let secondaryParentLayerPath = 'model.hierarchy'; | ||
let backgroundLayerPath = 'backgroundLayers'; |
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.
я вот тут немного не поняла, почему ушла 'model'
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.
Да, это ошибка. Сначала клал подложки в свойство контроллера после загрузки модели, сейчас они загружаются вместе с моделью и лежат в model.backgroundLayers
canBeBackground=true
property