Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Commit

Permalink
fix(fix #219): checkout
Browse files Browse the repository at this point in the history
checkout keep highlight box
  • Loading branch information
renxxing committed Nov 20, 2020
1 parent 289d3ef commit 15dca04
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/controllers/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -2356,7 +2356,7 @@ export default function luckysheetHandler() {
col = col_location[1],
col_pre = col_location[0],
col_index = col_location[2];

if ((x + 3) - Store.luckysheet_cols_change_size_start[0] > 30 && x < winW + scrollLeft - 100) {
$("#luckysheet-change-size-line").css({ "left": x });
$("#luckysheet-cols-change-size").css({ "left": x - 2 });
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/imageCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const imageCtrl = {
copyImgItemObj: null,
inserImg: function(src){
let _this = this;

let rowIndex = Store.luckysheet_select_save[0].row_focus || 0;
let colIndex = Store.luckysheet_select_save[0].column_focus || 0;
let left = colIndex == 0 ? 0 : Store.visibledatacolumn[colIndex - 1];
Expand Down
10 changes: 6 additions & 4 deletions src/controllers/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { getSheetIndex } from '../methods/get';
import Store from '../store';
import locale from '../locale/locale';
import dayjs from "dayjs";
import imageCtrl from './imageCtrl';

const server = {
gridKey: null,
Expand Down Expand Up @@ -163,9 +164,10 @@ const server = {

//客户端接收服务端数据时触发
_this.websocket.onmessage = function(result){
let data = eval('(' + result.data + ')');
console.info(data);
let type = data.type;
Store.result = result
let data = eval('(' + result.data + ')');
console.info(data);
let type = data.type;
let {message,id} = data;
// 用户退出时,关闭协同编辑时其提示框
if(message === '用户退出') {
Expand All @@ -176,7 +178,7 @@ const server = {
}
else if(type == 2){ //更新数据
let item = JSON.parse(data.data);
_this.wsUpdateMsg(item);
_this.wsUpdateMsg(item);
}
else if(type == 3){ //多人操作不同选区("t": "mv")(用不同颜色显示其他人所操作的选区)
let id = data.id;
Expand Down
3 changes: 3 additions & 0 deletions src/controllers/sheetBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ export function initialSheetBar(){

let $t = $(this), $cur = $(e.target);
luckysheetsheetrightclick($t, $cur, e);
let result = Store.result
server.websocket.onmessage(result)
});

let luckysheetsheetnameeditor = function ($t) {
Expand All @@ -221,6 +223,7 @@ export function initialSheetBar(){

$("#luckysheet-sheet-area").on("dblclick", "span.luckysheet-sheets-item-name", function (e) {
luckysheetsheetnameeditor($(this));
console.log(123);
});

$("#luckysheet-sheet-area").on("blur", "span.luckysheet-sheets-item-name", function (e) {
Expand Down

0 comments on commit 15dca04

Please sign in to comment.