<commit_before>/**
 * Map组件
 * @author yellow date 2017/7/24
 * -由于此组件包含input,button。可以根据需要拆分组件
 * 
 */
import React, { Component } from "react";
import { connect } from "react-redux";
import RootReducer from "./../../redux/RootReducer";
import PropTypes from "prop-types";
import * as maptalks from "maptalks";
import { SnapTool } from "maptalks.snapto";
// import projectData from "./../../redux/RootData";
import appConfig from "../../redux/Config";

//引入地图组件
import MapToolBar from "./MapToolBar";
import { stat } from "fs";
/**
 * @type {maptalks.Map}
 * 全局的地图对象和方法
 */
let map,ProjectName;
//添加画图工具
let drawTool = new maptalks.DrawTool({
  mode: "Polygon",
  symbol: {
    lineColor: "#000",
    lineWidth: 3
  }
});
 //为界址点图层添加snapto工具
let snap = new SnapTool({
  tolerance: 40,
  mode: "point"
});
let target,
  clickedObj = [],
  editingLabel=[],
  linePoiArr = [];
let clickObj, deleteObj, recoverObj, addLabel,editLabel;
//用于获取点线面对象
clickObj =
  clickObj ||
  function(e) {
    target = e.target;
    console.log(target);
    target.config('isClicked',!target.options.isClicked)
    //判断是首次点击高亮还是第二次点击取消选中
    if (target.getJSONType() === "Circle") {
      //首次点击高亮显示选中对象，并添加至存储选中对象的数组
      if (target.options.isClicked) {
        target.updateSymbol({ polygonFill: "#00FFFF", lineColor: "#00FFFF" });
        linePoiArr.push(target.getId());
        clickedObj.push(target);
      }else {//第二次点击取消高亮效果，并从存储选中对象的数组中移除
        for(let i=0;i<clickedObj.length;i++){<commit_msg>调整捕捉工具样式<commit_after>/**
 * Map组件
 * @author yellow date 2017/7/24
 * -由于此组件包含input,button。可以根据需要拆分组件
 * 
 */
import React, { Component } from "react";
import { connect } from "react-redux";
import RootReducer from "./../../redux/RootReducer";
import PropTypes from "prop-types";
import * as maptalks from "maptalks";
import { SnapTool } from "maptalks.snapto";
// import projectData from "./../../redux/RootData";
import appConfig from "../../redux/Config";

//引入地图组件
import MapToolBar from "./MapToolBar";
import { stat } from "fs";
/**
 * @type {maptalks.Map}
 * 全局的地图对象和方法
 */
let map,ProjectName;
//添加画图工具
let drawTool = new maptalks.DrawTool({
  mode: "Polygon",
  symbol: {
    lineColor: "#000",
    lineWidth: 3
  }
});
 //为界址点图层添加snapto工具
let snap = new SnapTool({
  tolerance: 40,
  mode: "point",
  symbol: {
    'markerType': 'ellipse',
    'markerFill': '#0f89f5',
    'markerLineColor': '#fff',
    'markerLineWidth': 1,
    'markerLineOpacity': 1,
    'markerWidth': 8,
    'markerHeight': 8
}
});
let target,
  clickedObj = [],
  editingLabel=[],
  linePoiArr = [];
let clickObj, deleteObj, recoverObj, addLabel,editLabel;
//用于获取点线面对象
clickObj =
  clickObj ||
  function(e) {
    target = e.target;
    console.log(target);
    target.config('isClicked',!target.options.isClicked)
    //判断是首次点击高亮还是第二次点击取消选中
    if (target.getJSONType() === "Circle") {
      //首次点击高亮显示选中对象，并添加至存储选中对象的数组
      if (target.options.isClicked) {
        target.updateSymbol({ polygonFill: "#00FFFF", lineColor: "#00FFFF" });
        linePoiArr.push(target.getId());
        clickedObj.push(target);
      }else {//第二次点击取消高亮效果，并从存储选中对象的数组中移除
        for(let i=0;i<clickedObj.length;i++){
{'fraction_non_alphanumeric': 0.16619362976978871, 'fraction_numerical': 0.013875748975086723, 'mean_word_length': 3.5444126074498565, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2234773', 'n_tokens_mistral': 1312, 'n_tokens_neox': 1351, 'n_words': 238}