Browse Source

Merge pull request #1701 from mojiajuzi/hasmany_map

fix the hasmany map question #1065
Jiang Qinghua 3 năm trước cách đây
mục cha
commit
9de8e3d456
1 tập tin đã thay đổi với 19 bổ sung0 xóa
  1. 19 0
      src/Form/Field/Map.php

+ 19 - 0
src/Form/Field/Map.php

@@ -132,4 +132,23 @@ class Map extends Field
 
         return parent::render();
     }
+
+    /**
+     * Set element class.
+     *
+     * @param  string|array  $class
+     * @param  bool  $normalize
+     * @return $this
+     */
+    public function setElementClass($class, bool $normalize = true)
+    {
+        if ($normalize) {
+            $class = $this->normalizeElementClass($class);
+        }
+        
+        $strClass = array_merge($class["lat"],$class["lng"]);
+        $this->elementClass = $strClass;
+        
+        return $this;
+    }
 }