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

Added api bookmarks #444

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Added api bookmarks #444

wants to merge 2 commits into from

Conversation

iskakov
Copy link
Contributor

@iskakov iskakov commented Nov 10, 2020

Добавлены 3 функции Api по работе с закладками:

  • Просмотр закладок
  • Добавление закладки
  • Удаление закладки

Get spartial bookmarks from localStorage.
@method getSpatialBookmarks
@param {Array} bookmarkIds Array of spartial bookmarks id.
@return {Promise} If objectIds equal ubdefined return all spartial bookmarks else return spartial bookmarks where objectIds inculde bookmark id.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

опечатка в undefined

return new Ember.RSVP.Promise((resolve, reject) => {
try {
let mapKey = this.get('mapApi').getFromApi('mapModel').get('id');
let bookmarksStore = this.get('localStorageService').getFromStorage('bookmarks', mapKey);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а зачем мы ограничиваем закладки только на текущую карту?

this.get('localStorageService').setToStorage('bookmarks', mapKey, bookmarks);
resolve('succes');
} else {
reject('objectIds does');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

неполное предложение

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants