-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
fix popup actions #208
fix popup actions #208
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 |
---|---|---|
|
@@ -110,6 +110,7 @@ import ComboBoxInput from "@arcgis/core/form/elements/inputs/ComboBoxInput"; | |
import RadioButtonsInput from "@arcgis/core/form/elements/inputs/RadioButtonsInput"; | ||
import SwitchInput from "@arcgis/core/form/elements/inputs/SwitchInput"; | ||
import Domain from "@arcgis/core/layers/support/Domain"; | ||
import * as reactiveUtils from "@arcgis/core/core/reactiveUtils"; | ||
|
||
|
||
export function buildJsSpatialReference(dotNetSpatialReference: DotNetSpatialReference): SpatialReference { | ||
|
@@ -260,9 +261,12 @@ export function buildJsPopupTemplate(popupTemplateObject: DotNetPopupTemplate, v | |
if (hasValue(templateTriggerActionHandler)) { | ||
templateTriggerActionHandler.remove(); | ||
} | ||
templateTriggerActionHandler = view.popup.on("trigger-action", async (event: PopupTriggerActionEvent) => { | ||
await popupTemplateObject.dotNetPopupTemplateReference.invokeMethodAsync("OnTriggerAction", event.action.id); | ||
}); | ||
reactiveUtils.once(() => view.popup.on !== undefined) | ||
.then(() => { | ||
templateTriggerActionHandler = view.popup.on("trigger-action", async (event: PopupTriggerActionEvent) => { | ||
await popupTemplateObject.dotNetPopupTemplateReference.invokeMethodAsync("OnTriggerAction", event.action.id); | ||
}); | ||
}) | ||
} | ||
catch (error) { | ||
console.debug(error); | ||
|
@@ -727,9 +731,9 @@ export function buildJsQuery(dotNetQuery: DotNetQuery): Query { | |
where: dotNetQuery.where ?? "1=1", | ||
spatialRelationship: dotNetQuery.spatialRelationship as any ?? "intersects", | ||
distance: dotNetQuery.distance ?? undefined, | ||
units: dotNetQuery.units as any ?? null, | ||
units: dotNetQuery.units as any ?? undefined, | ||
returnGeometry: dotNetQuery.returnGeometry ?? false, | ||
outFields: dotNetQuery.outFields ?? null, | ||
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. Same here, default value is null: 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. Yes, I haven't actually improved anything here, but I also didn't hurt anything. I think I made this change as part of an investigation into an issue, and it seemed to make more sense to me to keep it |
||
outFields: dotNetQuery.outFields ?? undefined, | ||
orderByFields: dotNetQuery.orderByFields ?? undefined, | ||
outStatistics: dotNetQuery.outStatistics ?? undefined, | ||
groupByFieldsForStatistics: dotNetQuery.groupByFieldsForStatistics ?? undefined, | ||
|
@@ -748,7 +752,7 @@ export function buildJsQuery(dotNetQuery: DotNetQuery): Query { | |
having: dotNetQuery.having ?? undefined, | ||
historicMoment: dotNetQuery.historicMoment ?? undefined, | ||
maxRecordCountFactor: dotNetQuery.maxRecordCountFactor ?? 1, | ||
text: dotNetQuery.text ?? null, | ||
text: dotNetQuery.text ?? undefined, | ||
parameterValues: dotNetQuery.parameterValues ?? undefined, | ||
quantizationParameters: dotNetQuery.quantizationParameters ?? undefined, | ||
rangeValues: dotNetQuery.rangeValues ?? undefined, | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html#units
The default value is null per the API?