-
Notifications
You must be signed in to change notification settings - Fork 409
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
4216 media editor and maps #4278
Conversation
@@ -92,7 +95,7 @@ export const openMediaEditorForNewMedia = action$ => | |||
Observable.of( | |||
update( | |||
path, | |||
{ resourceId: resource.id, type: "image" }, // TODO take type from mediaEditor state or from resource | |||
{ resourceId: resource.id, type: currentMediaTypeSelector(store.getState()) }, // TODO take type from mediaEditor state or from resource |
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.
{ resourceId: resource.id, type: currentMediaTypeSelector(store.getState()) }, // TODO take type from mediaEditor state or from resource | |
{ resourceId: resource.id, type: currentMediaTypeSelector(store.getState()) }, |
web/client/epics/geostory.js
Outdated
const resourceAlreadyPresent = head(resourcesSelector(state).filter(r => r.data && (sourceId !== SourceTypes.GEOSTORY && r.data.id || r.id) === resource.id)); | ||
|
||
let resourceId = resource.id; | ||
if (!resourceAlreadyPresent && resource.type === MediaTypes.MAP && sourceId !== SourceTypes.GEOSTORY) { |
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.
Don't need to be a map. Every content from local source should not be added twice
if (!resourceAlreadyPresent && resource.type === MediaTypes.MAP && sourceId !== SourceTypes.GEOSTORY) { | |
if (!resourceAlreadyPresent && sourceId !== SourceTypes.GEOSTORY) { |
web/client/epics/geostory.js
Outdated
|
||
let resourceId = resource.id; | ||
if (!resourceAlreadyPresent && resource.type === MediaTypes.MAP && sourceId !== SourceTypes.GEOSTORY) { | ||
// if using a geostore map that is not present in the story => add it |
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 using a geostore map that is not present in the story => add it | |
// if the resource is new, add it to the story resources list |
web/client/utils/GeoStoryUtils.js
Outdated
export const lists = { | ||
StoryTypes: values(StoryTypes), | ||
SectionTypes: values(SectionTypes), | ||
MediaTypes: values(MediaTypes), | ||
Modes: values(Modes) | ||
}; | ||
|
||
export const defaultLayerMapPreview = { |
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.
same here, in mediaeditor utils
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.
- please separate the utilities that are proper of the media editor from GeoStory
MediaEditor is a separate thing, should not know geostory, only the resource type. - see my comments
- Solve issues with map catalog in widgets
Description
This pr add possibility to add maps to the background via the media editor
some additions:
Issues
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
What is the current behavior? (You can also link to an open issue here)
What is the new behavior?
Does this PR introduce a breaking change? (check one with "x", remove the other)
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information: