isobit-ui 0.0.162 → 0.0.166

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +29 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * isobit-ui v0.0.162
2
+ * isobit-ui v0.0.166
3
3
  * (c) Erik Alarcon Pinedo
4
4
  * Released under the MIT License.
5
5
  */
@@ -3636,6 +3636,22 @@ var __vue_component__$3 = /*#__PURE__*/__vue_normalize____default['default']({
3636
3636
  staticRenderFns: __vue_staticRenderFns__$3
3637
3637
  }, __vue_inject_styles__$3, __vue_script__$3, __vue_scope_id__$3, __vue_is_functional_template__$3, __vue_module_identifier__$3, false, undefined, undefined, undefined);
3638
3638
 
3639
+ function _typeof(obj) {
3640
+ "@babel/helpers - typeof";
3641
+
3642
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
3643
+ _typeof = function (obj) {
3644
+ return typeof obj;
3645
+ };
3646
+ } else {
3647
+ _typeof = function (obj) {
3648
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
3649
+ };
3650
+ }
3651
+
3652
+ return _typeof(obj);
3653
+ }
3654
+
3639
3655
  //
3640
3656
  //
3641
3657
  //
@@ -3670,24 +3686,25 @@ var script$2 = {
3670
3686
  addFeature: function addFeature(f, cfg) {
3671
3687
  f = f ? f : {};
3672
3688
  var me = this,
3673
- p,
3689
+ point,
3674
3690
  map = me.map;
3675
3691
 
3676
3692
  if (f.lon && f.lat) {
3677
3693
  var c = [f.lon, f.lat];
3678
- p = new ol.geom.Point(c[0] > -100 ? ol.proj.fromLonLat(c) : c);
3694
+ point = new ol.geom.Point(c[0] > -100 ? ol.proj.fromLonLat(c) : c);
3679
3695
  } else {
3680
- console.log('Se usara la coordenada central');
3681
- p = new ol.geom.Point(map.getView().getCenter());
3696
+ point = new ol.geom.Point(map.getView().getCenter());
3682
3697
  }
3683
3698
 
3684
- c = p.flatCoordinates;
3699
+ c = point.flatCoordinates;
3685
3700
  var c = c[0] < -10000 ? ol.proj.toLonLat(c) : c;
3686
3701
  me.$emit('translateend', {
3687
3702
  lon: c[0],
3688
3703
  lat: c[1]
3689
3704
  });
3690
- var feature = new ol.Feature(p);
3705
+ f.geometry = point;
3706
+ console.log(f);
3707
+ var feature = new ol.Feature(f);
3691
3708
  feature.data = f;
3692
3709
 
3693
3710
  if (f.draggable) {
@@ -3710,8 +3727,11 @@ var script$2 = {
3710
3727
  me.map.addInteraction(translateIteraction);
3711
3728
  }
3712
3729
 
3713
- feature.setStyle(me.styleMap[f.style ? f.style : 'default']);
3714
- c = p.flatCoordinates;
3730
+ if (_typeof(f.style) == 'object') {
3731
+ feature.setStyle(f.style);
3732
+ } else feature.setStyle(me.styleMap[f.style ? f.style : 'default']);
3733
+
3734
+ c = point.flatCoordinates;
3715
3735
  c = c[0] < -10000 ? ol.proj.toLonLat(c) : c;
3716
3736
  me.$emit('translateend', {
3717
3737
  lon: c[0],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isobit-ui",
3
- "version": "0.0.162",
3
+ "version": "0.0.166",
4
4
  "description": "Vue component to play videos",
5
5
  "keywords": [
6
6
  "ui",