Move ol.WFSTransactionResponse to ol/format/WFS

This commit is contained in:
Michael Kuenzli
2018-04-18 16:59:29 +02:00
committed by Frederic Junod
parent d4a6169052
commit addcdf745f
2 changed files with 14 additions and 14 deletions
+14 -4
View File
@@ -75,6 +75,16 @@ import {createElementNS, isDocument, isNode, makeArrayPusher, makeChildAppender,
*/ */
/**
* Total deleted; total inserted; total updated; array of insert ids.
* @typedef {Object} TransactionResponse
* @property {number} totalDeleted
* @property {number} totalInserted
* @property {number} totalUpdated
* @property {Array.<string>} insertIds
*/
/** /**
* @type {string} * @type {string}
*/ */
@@ -223,7 +233,7 @@ WFS.prototype.readFeaturesFromNode = function(node, opt_options) {
* Read transaction response of the source. * Read transaction response of the source.
* *
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @return {ol.WFSTransactionResponse|undefined} Transaction response. * @return {module:ol/format/WFS~TransactionResponse|undefined} Transaction response.
* @api * @api
*/ */
WFS.prototype.readTransactionResponse = function(source) { WFS.prototype.readTransactionResponse = function(source) {
@@ -392,7 +402,7 @@ const TRANSACTION_RESPONSE_PARSERS = {
/** /**
* @param {Document} doc Document. * @param {Document} doc Document.
* @return {ol.WFSTransactionResponse|undefined} Transaction response. * @return {module:ol/format/WFS~TransactionResponse|undefined} Transaction response.
*/ */
WFS.prototype.readTransactionResponseFromDocument = function(doc) { WFS.prototype.readTransactionResponseFromDocument = function(doc) {
for (let n = doc.firstChild; n; n = n.nextSibling) { for (let n = doc.firstChild; n; n = n.nextSibling) {
@@ -406,11 +416,11 @@ WFS.prototype.readTransactionResponseFromDocument = function(doc) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @return {ol.WFSTransactionResponse|undefined} Transaction response. * @return {module:ol/format/WFS~TransactionResponse|undefined} Transaction response.
*/ */
WFS.prototype.readTransactionResponseFromNode = function(node) { WFS.prototype.readTransactionResponseFromNode = function(node) {
return pushParseAndPop( return pushParseAndPop(
/** @type {ol.WFSTransactionResponse} */({}), /** @type {module:ol/format/WFS~TransactionResponse} */({}),
TRANSACTION_RESPONSE_PARSERS, node, []); TRANSACTION_RESPONSE_PARSERS, node, []);
}; };
-10
View File
@@ -148,13 +148,3 @@ ol.LoadingStrategy;
* (Array.<number>|ImageData)} * (Array.<number>|ImageData)}
*/ */
ol.RasterOperation; ol.RasterOperation;
/**
* Total deleted; total inserted; total updated; array of insert ids.
* @typedef {{totalDeleted: number,
* totalInserted: number,
* totalUpdated: number,
* insertIds: Array.<string>}}
*/
ol.WFSTransactionResponse;