mirror of
https://github.com/Esri/offline-editor-js.git
synced 2025-12-15 15:20:05 +00:00
20 lines
556 B
JavaScript
20 lines
556 B
JavaScript
"use strict"
|
|
|
|
define(["edit/editsStore"],function(editsStore)
|
|
{
|
|
return function OfflineUtils()
|
|
{
|
|
/**
|
|
* Measures the size of the graphic's geometry and attributes.
|
|
* This is a very fast method that only provides a basic estimation.
|
|
* @param graphic
|
|
* @returns {number}
|
|
*/
|
|
// jabadia: probably won't be needed
|
|
this.apprxGraphicSize = function(graphic) {
|
|
var g = editsStore._serialize(graphic);
|
|
return ((g.length *2)/1024/1024).round(4);
|
|
}
|
|
}
|
|
});
|