File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " @jx3box/jx3box-map" ,
3- "version" : " 1.1.9 " ,
3+ "version" : " 1.1.10 " ,
44 "description" : " JX3BOX Game Map" ,
55 "main" : " index.js" ,
66 "files" : [
Original file line number Diff line number Diff line change @@ -276,7 +276,8 @@ export default {
276276 this .initInnerOffset (this .focusPoint );
277277 });
278278 },
279- centerPoint () {
279+ centerPoint (newVal , oldVal ) {
280+ if (this .isSamePoint (newVal, oldVal)) return ;
280281 this .$nextTick (() => {
281282 this .initInnerOffset (this .focusPoint );
282283 });
@@ -347,6 +348,11 @@ export default {
347348 bottom: bottom + " px" ,
348349 };
349350 },
351+ isSamePoint (a , b ) {
352+ if (a === b) return true ;
353+ if (! a || ! b) return false ;
354+ return a .x === b .x && a .y === b .y && a .z === b .z ;
355+ },
350356 isPointsInRect (rect ) {
351357 if (! this .datas .length ) return false ;
352358 let points = this .datas .map ((p ) => {
You can’t perform that action at this time.
0 commit comments