123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749 |
- import { dataService } from "../Service/DataService";
- import { roadService } from "../Service/RoadService";
- import { historyUtil } from "./HistoryUtil";
- import HistoryEvents from "../enum/HistoryEvents";
- import { coordinate } from "../Coordinate";
- import { mathUtil } from "../Util/MathUtil";
- import Settings from "../Settings";
- export default class Change {
- constructor() {
- this.lastData = {}; // 每次都是当前数据和lastData进行比较,一般在mouseDown的时候存储进来
- this.currentData = {}; // 当前的变化
- }
- // 保存当前记录
- saveCurrentInfo() {
- // this.lastData.roadPoints = JSON.parse(
- // JSON.stringify(dataService.getRoadPoints())
- // );
- //this.lastData.roads = JSON.parse(JSON.stringify(dataService.getRoads()));
- this.lastData.lines = JSON.parse(JSON.stringify(dataService.getLines()));
- this.lastData.texts = JSON.parse(JSON.stringify(dataService.getTexts()));
- this.lastData.points = JSON.parse(JSON.stringify(dataService.getPoints()));
- this.lastData.curveLines = JSON.parse(
- JSON.stringify(dataService.getCurveLines())
- );
- this.lastData.curvePoints = JSON.parse(
- JSON.stringify(dataService.getCurvePoints())
- );
- this.lastData.circles = JSON.parse(
- JSON.stringify(dataService.getCircles())
- );
- this.lastData.magnifiers = JSON.parse(
- JSON.stringify(dataService.getMagnifiers())
- );
- this.lastData.svgs = JSON.parse(JSON.stringify(dataService.getSVGs()));
- this.lastData.roadPoints = JSON.parse(
- JSON.stringify(dataService.getRoadPoints())
- );
- this.lastData.roadEdges = JSON.parse(
- JSON.stringify(dataService.getRoadEdges())
- );
- this.lastData.roads = JSON.parse(JSON.stringify(dataService.getRoads()));
- this.lastData.curveRoadPoints = JSON.parse(
- JSON.stringify(dataService.getCurveRoadPoints())
- );
- this.lastData.curveRoadEdges = JSON.parse(
- JSON.stringify(dataService.getCurveRoadEdges())
- );
- this.lastData.curveRoads = JSON.parse(
- JSON.stringify(dataService.getCurveRoads())
- );
- this.lastData.crossPoints = JSON.parse(
- JSON.stringify(dataService.getCrossPoints())
- );
- this.lastData.settings = JSON.parse(JSON.stringify(Settings));
- }
- operate() {
- //
- this.currentData = {};
- // this.compareRoads();
- this.comparePoints();
- this.compareLines();
- this.compareCurvePoints();
- this.compareCurveLines();
- this.compareCircles();
- this.compareTexts();
- this.compareMagnifiers();
- this.compareSVGs();
- this.compareRoadPoints();
- this.compareRoadEdges();
- this.compareRoads();
- this.compareCurveRoadPoints();
- this.compareCurveRoadEdges();
- this.compareCurveRoads();
- this.compareCrossPoints();
- this.compareSettings();
- if (
- this.currentData.points.length == 0 &&
- this.currentData.lines.length == 0 &&
- this.currentData.curvePoints.length == 0 &&
- this.currentData.curveLines.length == 0 &&
- this.currentData.circles.length == 0 &&
- this.currentData.texts.length == 0 &&
- this.currentData.magnifiers.length == 0 &&
- this.currentData.roadPoints.length == 0 &&
- this.currentData.roadEdges.length == 0 &&
- this.currentData.roads.length == 0 &&
- this.currentData.curveRoadPoints.length == 0 &&
- this.currentData.curveRoadEdges.length == 0 &&
- this.currentData.curveRoads.length == 0 &&
- this.currentData.crossPoints.length == 0 &&
- !this.currentData.settings
- ) {
- this.saveCurrentInfo();
- return false;
- }
- this.lastData = {};
- // 这里不能取this.records.length-1,因为可能撤销后操作,这时候应该是覆盖,而不是往后面添加
- return true;
- }
- comparePoints() {
- const points = dataService.getPoints();
- this.currentData.points = [];
- for (const key in points) {
- const point = points[key];
- // 不存在意味着增加
- if (!this.lastData.points[key]) {
- const item = {
- handle: HistoryEvents.AddPoint,
- point: historyUtil.getDataForPoint(point),
- };
- this.currentData.points.push(item);
- } else {
- const lastPoint = this.lastData.points[key];
- if (!historyUtil.isDifferentForPoints(point, lastPoint)) {
- delete this.lastData.points[key];
- continue;
- } else {
- const item = {
- handle: HistoryEvents.ModifyPoint,
- prePoint: historyUtil.getDataForPoint(lastPoint),
- curPoint: historyUtil.getDataForPoint(point),
- };
- this.currentData.points.push(item);
- }
- }
- delete this.lastData.points[key];
- }
- for (const key in this.lastData.points) {
- const item = {
- handle: HistoryEvents.DeletePoint,
- point: historyUtil.getDataForPoint(this.lastData.points[key]),
- };
- this.currentData.points.push(item);
- }
- }
- compareLines() {
- const lines = dataService.getLines();
- this.currentData.lines = [];
- for (const key in lines) {
- const line = lines[key];
- // 不存在意味着增加
- if (!this.lastData.lines[key]) {
- const item = {
- handle: HistoryEvents.AddLine,
- line: historyUtil.getDataForLine(line),
- };
- this.currentData.lines.push(item);
- } else {
- const lastLine = this.lastData.lines[key];
- if (!historyUtil.isDifferentForLines(line, lastLine)) {
- delete this.lastData.lines[key];
- continue;
- } else {
- const item = {
- handle: HistoryEvents.ModifyLine,
- preLine: historyUtil.getDataForLine(lastLine),
- curLine: historyUtil.getDataForLine(line),
- };
- this.currentData.lines.push(item);
- }
- }
- delete this.lastData.lines[key];
- }
- for (const key in this.lastData.lines) {
- const item = {
- handle: HistoryEvents.DeleteLine,
- line: historyUtil.getDataForLine(this.lastData.lines[key]),
- };
- this.currentData.lines.push(item);
- }
- }
- compareCurvePoints() {
- const curvePoints = dataService.getCurvePoints();
- this.currentData.curvePoints = [];
- for (const key in curvePoints) {
- const curvePoint = curvePoints[key];
- // 不存在意味着增加
- if (!this.lastData.curvePoints[key]) {
- const item = {
- handle: HistoryEvents.AddCurvePoint,
- curvePoint: historyUtil.getDataForCurvePoint(curvePoint),
- };
- this.currentData.curvePoints.push(item);
- } else {
- const lastCurvePoint = this.lastData.curvePoints[key];
- if (
- !historyUtil.isDifferentForCurvePoints(curvePoint, lastCurvePoint)
- ) {
- delete this.lastData.curvePoints[key];
- continue;
- } else {
- const item = {
- handle: HistoryEvents.ModifyCurvePoint,
- preCurvePoint: historyUtil.getDataForCurvePoint(lastCurvePoint),
- curCurvePoint: historyUtil.getDataForCurvePoint(curvePoint),
- };
- this.currentData.curvePoints.push(item);
- }
- }
- delete this.lastData.curvePoints[key];
- }
- for (const key in this.lastData.curvePoints) {
- const item = {
- handle: HistoryEvents.DeleteCurvePoint,
- curvePoint: historyUtil.getDataForCurvePoint(
- this.lastData.curvePoints[key]
- ),
- };
- this.currentData.curvePoints.push(item);
- }
- }
- compareCurveLines() {
- const curveLines = dataService.getCurveLines();
- this.currentData.curveLines = [];
- for (const key in curveLines) {
- const curveLine = curveLines[key];
- // 不存在意味着增加
- if (!this.lastData.curveLines[key]) {
- const item = {
- handle: HistoryEvents.AddCurveLine,
- curveLine: historyUtil.getDataForCurveLine(curveLine),
- };
- this.currentData.curveLines.push(item);
- } else {
- const lastCurveLine = this.lastData.curveLines[key];
- if (!historyUtil.isDifferentForCurveLines(curveLine, lastCurveLine)) {
- delete this.lastData.curveLines[key];
- continue;
- } else {
- const item = {
- handle: HistoryEvents.ModifyCurveLine,
- preCurveLine: historyUtil.getDataForCurveLine(lastCurveLine),
- curCurveLine: historyUtil.getDataForCurveLine(curveLine),
- };
- this.currentData.curveLines.push(item);
- }
- }
- delete this.lastData.curveLines[key];
- }
- for (const key in this.lastData.curveLines) {
- const item = {
- handle: HistoryEvents.DeleteCurveLine,
- curveLine: historyUtil.getDataForCurveLine(
- this.lastData.curveLines[key]
- ),
- };
- this.currentData.curveLines.push(item);
- }
- }
- compareTexts() {
- this.currentData.texts = [];
- const texts = dataService.getTexts();
- for (const key in texts) {
- const text = texts[key];
- const lastText = this.lastData.texts[key];
- // 不存在意味着增加
- if (!lastText) {
- const item = {
- handle: HistoryEvents.AddText,
- text: historyUtil.getDataForText(text),
- };
- this.currentData.texts.push(item);
- } else {
- if (!historyUtil.isDifferentForTexts(text, lastText)) {
- delete this.lastData.texts[key];
- continue;
- } else {
- const item = {
- handle: HistoryEvents.ModifyText,
- preText: historyUtil.getDataForText(lastText),
- curText: historyUtil.getDataForText(text),
- };
- this.currentData.texts.push(item);
- }
- }
- delete this.lastData.texts[key];
- }
- for (const key in this.lastData.texts) {
- const item = {
- handle: HistoryEvents.DeleteText,
- text: historyUtil.getDataForText(this.lastData.texts[key]),
- };
- this.currentData.texts.push(item);
- }
- }
- compareCircles() {
- const circles = dataService.getCircles();
- this.currentData.circles = [];
- for (const key in circles) {
- const circle = circles[key];
- // 不存在意味着增加
- if (!this.lastData.circles[key]) {
- const item = {
- handle: HistoryEvents.AddCircle,
- circle: historyUtil.getDataForCircle(circle),
- };
- this.currentData.circles.push(item);
- } else {
- const lastCircle = this.lastData.circles[key];
- if (!historyUtil.isDifferentForCircles(circle, lastCircle)) {
- delete this.lastData.circles[key];
- continue;
- } else {
- const item = {
- handle: HistoryEvents.ModifyCircle,
- preCircle: historyUtil.getDataForCircle(lastCircle),
- curCircle: historyUtil.getDataForCircle(circle),
- };
- this.currentData.circles.push(item);
- }
- }
- delete this.lastData.circles[key];
- }
- for (const key in this.lastData.circles) {
- const item = {
- handle: HistoryEvents.DeleteCircle,
- circle: historyUtil.getDataForCircle(this.lastData.circles[key]),
- };
- this.currentData.circles.push(item);
- }
- }
- compareMagnifiers() {
- const magnifiers = dataService.getMagnifiers();
- this.currentData.magnifiers = [];
- for (const key in magnifiers) {
- const magnifier = magnifiers[key];
- // 不存在意味着增加
- if (!this.lastData.magnifiers[key]) {
- const item = {
- handle: HistoryEvents.AddMagnifier,
- magnifier: historyUtil.getDataForMagnifier(magnifier),
- };
- this.currentData.magnifiers.push(item);
- } else {
- const lastMagnifier = this.lastData.magnifiers[key];
- if (!historyUtil.isDifferentForMagnifiers(magnifier, lastMagnifier)) {
- delete this.lastData.magnifiers[key];
- continue;
- } else {
- const item = {
- handle: HistoryEvents.ModifyMagnifier,
- preMagnifier: historyUtil.getDataForMagnifier(lastMagnifier),
- curMagnifier: historyUtil.getDataForMagnifier(magnifier),
- };
- this.currentData.magnifiers.push(item);
- }
- }
- delete this.lastData.magnifiers[key];
- }
- for (const key in this.lastData.magnifiers) {
- const item = {
- handle: HistoryEvents.DeleteMagnifier,
- magnifier: historyUtil.getDataForMagnifier(
- this.lastData.magnifiers[key]
- ),
- };
- this.currentData.magnifiers.push(item);
- }
- }
- compareSVGs() {
- this.currentData.svgs = [];
- const svgs = dataService.getSVGs();
- for (const key in svgs) {
- const svg = svgs[key];
- const lastSVG = this.lastData.svgs[key];
- // 不存在意味着增加
- if (!lastSVG) {
- const item = {
- handle: HistoryEvents.AddSVG,
- svg: historyUtil.getDataForSVG(svg),
- };
- this.currentData.svgs.push(item);
- } else {
- if (!historyUtil.isDifferentForSVGs(svg, lastSVG)) {
- delete this.lastData.svgs[key];
- continue;
- } else {
- const item = {
- handle: HistoryEvents.ModifySVG,
- preSVG: historyUtil.getDataForSVG(lastSVG),
- curSVG: historyUtil.getDataForSVG(svg),
- };
- this.currentData.svgs.push(item);
- }
- }
- delete this.lastData.svgs[key];
- }
- for (const key in this.lastData.svgs) {
- const item = {
- handle: HistoryEvents.DeleteSVG,
- svg: historyUtil.getDataForSVG(this.lastData.svgs[key]),
- };
- this.currentData.svgs.push(item);
- }
- }
- compareRoadPoints() {
- this.currentData.roadPoints = [];
- const roadPoints = dataService.getRoadPoints();
- for (const key in roadPoints) {
- const roadPoint = roadPoints[key];
- const lastRoadPoint = this.lastData.roadPoints[key];
- // 不存在意味着增加
- if (!lastRoadPoint) {
- const item = {
- handle: HistoryEvents.AddRoadPoint,
- roadPoint: historyUtil.getDataForRoadPoint(roadPoint),
- };
- this.currentData.roadPoints.push(item);
- } else {
- if (!historyUtil.isDifferentForRoadPoints(roadPoint, lastRoadPoint)) {
- delete this.lastData.roadPoints[key];
- continue;
- } else {
- const item = {
- handle: HistoryEvents.ModifyRoadPoint,
- preRoadPoint: historyUtil.getDataForRoadPoint(lastRoadPoint),
- curRoadPoint: historyUtil.getDataForRoadPoint(roadPoint),
- };
- this.currentData.roadPoints.push(item);
- }
- }
- delete this.lastData.roadPoints[key];
- }
- for (const key in this.lastData.roadPoints) {
- const item = {
- handle: HistoryEvents.DeleteRoadPoint,
- roadPoint: historyUtil.getDataForRoadPoint(
- this.lastData.roadPoints[key]
- ),
- };
- this.currentData.roadPoints.push(item);
- }
- }
- compareRoadEdges() {
- this.currentData.roadEdges = [];
- const roadEdges = dataService.getRoadEdges();
- for (const key in roadEdges) {
- const roadEdge = roadEdges[key];
- const lastRoadEdge = this.lastData.roadEdges[key];
- // 不存在意味着增加
- if (!lastRoadEdge) {
- const item = {
- handle: HistoryEvents.AddRoadEdge,
- roadEdge: historyUtil.getDataForRoadEdge(roadEdge),
- };
- this.currentData.roadEdges.push(item);
- } else {
- if (!historyUtil.isDifferentForRoadEdges(roadEdge, lastRoadEdge)) {
- delete this.lastData.roadEdges[key];
- continue;
- } else {
- const item = {
- handle: HistoryEvents.ModifyRoadEdge,
- preRoadEdge: historyUtil.getDataForRoadEdge(lastRoadEdge),
- curRoadEdge: historyUtil.getDataForRoadEdge(roadEdge),
- };
- this.currentData.roadEdges.push(item);
- }
- }
- delete this.lastData.roadEdges[key];
- }
- for (const key in this.lastData.roadEdges) {
- const item = {
- handle: HistoryEvents.DeleteRoadEdge,
- roadEdge: historyUtil.getDataForRoadEdge(this.lastData.roadEdges[key]),
- };
- this.currentData.roadEdges.push(item);
- }
- }
- compareRoads() {
- this.currentData.roads = [];
- const roads = dataService.getRoads();
- for (const key in roads) {
- const road = roads[key];
- const lastRoad = this.lastData.roads[key];
- // 不存在意味着增加
- if (!lastRoad) {
- const item = {
- handle: HistoryEvents.AddRoad,
- road: historyUtil.getDataForRoad(road),
- };
- this.currentData.roads.push(item);
- } else {
- if (!historyUtil.isDifferentForRoads(road, lastRoad)) {
- delete this.lastData.roads[key];
- continue;
- } else {
- const item = {
- handle: HistoryEvents.ModifyRoad,
- preRoad: historyUtil.getDataForRoad(lastRoad),
- curRoad: historyUtil.getDataForRoad(road),
- };
- this.currentData.roads.push(item);
- }
- }
- delete this.lastData.roads[key];
- }
- for (const key in this.lastData.roads) {
- const item = {
- handle: HistoryEvents.DeleteRoad,
- road: historyUtil.getDataForRoad(this.lastData.roads[key]),
- };
- this.currentData.roads.push(item);
- }
- }
- compareCurveRoadPoints() {
- this.currentData.curveRoadPoints = [];
- const curveRoadPoints = dataService.getCurveRoadPoints();
- for (const key in curveRoadPoints) {
- const curveRoadPoint = curveRoadPoints[key];
- const lastCurveRoadPoint = this.lastData.curveRoadPoints[key];
- // 不存在意味着增加
- if (!lastCurveRoadPoint) {
- const item = {
- handle: HistoryEvents.AddCurveRoadPoint,
- curveRoadPoint: historyUtil.getDataForCurveRoadPoint(curveRoadPoint),
- };
- this.currentData.curveRoadPoints.push(item);
- } else {
- if (
- !historyUtil.isDifferentForCurveRoadPoints(
- curveRoadPoint,
- lastCurveRoadPoint
- )
- ) {
- delete this.lastData.curveRoadPoints[key];
- continue;
- } else {
- const item = {
- handle: HistoryEvents.ModifyCurveRoadPoint,
- preCurveRoadPoint:
- historyUtil.getDataForCurveRoadPoint(lastCurveRoadPoint),
- curCurveRoadPoint:
- historyUtil.getDataForCurveRoadPoint(curveRoadPoint),
- };
- this.currentData.curveRoadPoints.push(item);
- }
- }
- delete this.lastData.curveRoadPoints[key];
- }
- for (const key in this.lastData.curveRoadPoints) {
- const item = {
- handle: HistoryEvents.DeleteCurveRoadPoint,
- curveRoadPoint: historyUtil.getDataForCurveRoadPoint(
- this.lastData.curveRoadPoints[key]
- ),
- };
- this.currentData.curveRoadPoints.push(item);
- }
- }
- compareCurveRoads() {
- this.currentData.curveRoads = [];
- const curveRoads = dataService.getCurveRoads();
- for (const key in curveRoads) {
- const curveRoad = curveRoads[key];
- const lastCurveRoad = this.lastData.curveRoads[key];
- // 不存在意味着增加
- if (!lastCurveRoad) {
- const item = {
- handle: HistoryEvents.AddCurveRoad,
- curveRoad: historyUtil.getDataForCurveRoad(curveRoad),
- };
- this.currentData.curveRoads.push(item);
- } else {
- if (!historyUtil.isDifferentForCurveRoads(curveRoad, lastCurveRoad)) {
- delete this.lastData.curveRoads[key];
- continue;
- } else {
- const item = {
- handle: HistoryEvents.ModifyCurveRoad,
- preCurveRoad: historyUtil.getDataForCurveRoad(lastCurveRoad),
- curCurveRoad: historyUtil.getDataForCurveRoad(curveRoad),
- };
- this.currentData.curveRoads.push(item);
- }
- }
- delete this.lastData.curveRoads[key];
- }
- for (const key in this.lastData.curveRoads) {
- const item = {
- handle: HistoryEvents.DeleteCurveRoad,
- curveRoad: historyUtil.getDataForCurveRoad(
- this.lastData.curveRoads[key]
- ),
- };
- this.currentData.curveRoads.push(item);
- }
- }
- compareCurveRoadEdges() {
- this.currentData.curveRoadEdges = [];
- const curveRoadEdges = dataService.getCurveRoadEdges();
- for (const key in curveRoadEdges) {
- const curveRoadEdge = curveRoadEdges[key];
- const lastCurveRoadEdge = this.lastData.curveRoadEdges[key];
- // 不存在意味着增加
- if (!lastCurveRoadEdge) {
- const item = {
- handle: HistoryEvents.AddCurveRoadEdge,
- curveRoadEdge: historyUtil.getDataForCurveRoadEdge(curveRoadEdge),
- };
- this.currentData.curveRoadEdges.push(item);
- } else {
- if (
- !historyUtil.isDifferentForCurveRoadEdges(
- curveRoadEdge,
- lastCurveRoadEdge
- )
- ) {
- delete this.lastData.curveRoadEdges[key];
- continue;
- } else {
- const item = {
- handle: HistoryEvents.ModifyCurveRoadEdge,
- preCurveRoadEdge:
- historyUtil.getDataForCurveRoadEdge(lastCurveRoadEdge),
- curCurveRoadEdge:
- historyUtil.getDataForCurveRoadEdge(curveRoadEdge),
- };
- this.currentData.curveRoadEdges.push(item);
- }
- }
- delete this.lastData.curveRoadEdges[key];
- }
- for (const key in this.lastData.curveRoadEdges) {
- const item = {
- handle: HistoryEvents.DeleteCurveRoadEdge,
- curveRoadEdge: historyUtil.getDataForCurveRoadEdge(
- this.lastData.curveRoadEdges[key]
- ),
- };
- this.currentData.curveRoadEdges.push(item);
- }
- }
- compareCrossPoints() {
- this.currentData.crossPoints = [];
- const crossPoints = dataService.getCrossPoints();
- for (const key in crossPoints) {
- const crossPoint = crossPoints[key];
- const lastCrossPoint = this.lastData.crossPoints[key];
- // 不存在意味着增加
- if (!lastCrossPoint) {
- const item = {
- handle: HistoryEvents.AddCrossPoint,
- crossPoint: historyUtil.getDataForCrossPoint(crossPoint),
- };
- this.currentData.crossPoints.push(item);
- } else {
- if (
- !historyUtil.isDifferentForCrossPoints(crossPoint, lastCrossPoint)
- ) {
- delete this.lastData.crossPoints[key];
- continue;
- } else {
- const item = {
- handle: HistoryEvents.ModifyCrossPoint,
- preCrossPoint: historyUtil.getDataForCrossPoint(lastCrossPoint),
- curCrossPoint: historyUtil.getDataForCrossPoint(crossPoint),
- };
- this.currentData.crossPoints.push(item);
- }
- }
- delete this.lastData.crossPoints[key];
- }
- for (const key in this.lastData.crossPoints) {
- const item = {
- handle: HistoryEvents.DeleteCrossPoint,
- crossPoint: historyUtil.getDataForCrossPoint(
- this.lastData.crossPoints[key]
- ),
- };
- this.currentData.crossPoints.push(item);
- }
- }
- compareSettings() {
- const lastSettings = this.lastData.settings;
- this.currentData.settings = null;
- if (historyUtil.isDifferentForSettings(Settings, lastSettings)) {
- const item = {
- handle: HistoryEvents.ModifySettings,
- preSettings: historyUtil.getDataForSettings(lastSettings),
- curSettings: historyUtil.getDataForSettings(Settings),
- };
- this.currentData.settings = item;
- }
- }
- }
- const change = new Change();
- export { change };
|