Commit 98fdb987 authored by SergeyLuzyanin's avatar SergeyLuzyanin

shadow after frozen place's border

parent 4462e68f
......@@ -121,9 +121,6 @@
ctx.fillRect(1, 1, 1, 1);
this.ptrnLineDotted1 = ctx.createPattern(cnv, "repeat");
this.frozenImageH = new Image();
this.frozenImageH.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAKCAYAAAB10jRKAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAJElEQVQYV2MAAjUQoQIiFECEDIiQABHCIIIPRHCBCDYgZmACABohANImre1SAAAAAElFTkSuQmCC';
this.halfSelection = false;
return this;
......
......@@ -3293,10 +3293,6 @@
}
ctx.stroke();
if (0 < row) {
ctx.drawImage(this.settings.frozenImageH, 0, 0, 1 * this.width_1px, 10 * this.height_1px, 0,
this.rows[row].top, ctx.getWidth(), this.height_1px * 10);
}
} else if (this.model.sheetViews[0].asc_getShowRowColHeaders()) {
fHorLine.apply(ctx, [0, this.headersHeight, this.headersWidth]);
fVerLine.apply(ctx, [this.headersWidth, 0, this.headersHeight]);
......
......@@ -729,12 +729,48 @@ DrawingArea.prototype.drawSelection = function(drawingDocument) {
ctx.globalAlpha = 1.0;
this.worksheet.objectRender.controller.drawSelection(drawingDocument);
var bReset = true;
if(this.frozenPlaces[i].type === FrozenAreaType.Bottom){
//autoShapeTrack.Graphics.put_GlobalAlpha(true, 1);
var fTop = this.worksheet.getCellTop(this.frozenPlaces[i].frozenCell.row, 0);
var fLeft = this.worksheet.getCellLeft(0, 0);
autoShapeTrack.drawImage(AscFormat.sFrozenImageUrl, fLeft, fTop, autoShapeTrack.Graphics.m_lWidthPix, 10);
}
else if(this.frozenPlaces[i].type === FrozenAreaType.Right){
var fTop = this.worksheet.getCellTop(0, 0);
var fLeft = this.worksheet.getCellLeft(this.frozenPlaces[i].frozenCell.col, 0);
autoShapeTrack.drawImage(AscFormat.sFrozenImageRotUrl, fLeft, fTop, 10, autoShapeTrack.Graphics.m_lHeightPix);
}
else if(this.frozenPlaces[i].type === FrozenAreaType.RightBottom){
//autoShapeTrack.Graphics.put_GlobalAlpha(true, 1);
var fTop = this.worksheet.getCellTop(this.frozenPlaces[i].frozenCell.row, 0);
var fLeft = this.worksheet.getCellLeft(this.frozenPlaces[i].frozenCell.col, 0);
autoShapeTrack.drawImage(AscFormat.sFrozenImageUrl, fLeft, fTop, autoShapeTrack.Graphics.m_lWidthPix, 10);
autoShapeTrack.drawImage(AscFormat.sFrozenImageRotUrl, fLeft, fTop, 10, autoShapeTrack.Graphics.m_lHeightPix);
}
else if(this.frozenPlaces[i].type === FrozenAreaType.LeftBottom){
var fTop = this.worksheet.getCellTop(this.frozenPlaces[i].frozenCell.row, 0);
var fLeft = this.worksheet.getCellLeft(0, 0);
autoShapeTrack.drawImage(AscFormat.sFrozenImageUrl, fLeft, fTop, autoShapeTrack.Graphics.m_lWidthPix, 10);
}
else if(this.frozenPlaces[i].type === FrozenAreaType.RightTop){
var fTop = this.worksheet.getCellTop(0, 0);
var fLeft = this.worksheet.getCellLeft(this.frozenPlaces[i].frozenCell.col, 0);
autoShapeTrack.drawImage(AscFormat.sFrozenImageRotUrl, fLeft, fTop, 10, autoShapeTrack.Graphics.m_lHeightPix);
}
if ( this.worksheet.objectRender.controller.needUpdateOverlay() ) {
trackOverlay.Show();
autoShapeTrack.Graphics.put_GlobalAlpha(true, 0.5);
this.worksheet.objectRender.controller.drawTracks(autoShapeTrack);
autoShapeTrack.Graphics.put_GlobalAlpha(true, 1);
bReset = true;
this.frozenPlaces[i].restore(autoShapeTrack);
}
}
// Restore
......
......@@ -39,6 +39,9 @@
*/
function (window, undefined) {
var sFrozenImageUrl = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAKCAYAAAB10jRKAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAJElEQVQYV2MAAjUQoQIiFECEDIiQABHCIIIPRHCBCDYgZmACABohANImre1SAAAAAElFTkSuQmCC';
var sFrozenImageRotUrl = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAABCAYAAADn9T9+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAGklEQVQYV2NkYGBQA+J/QPwHCf+GYiif4Q8AnJAJBNqB9DYAAAAASUVORK5CYII='
// Import
var c_oAscCellAnchorType = AscCommon.c_oAscCellAnchorType;
var c_oAscLockTypes = AscCommon.c_oAscLockTypes;
......@@ -1905,6 +1908,12 @@ function DrawingObjects() {
_this.showDrawingObjects(true);
};
if(!Asc.editor.ImageLoader.map_image_index[sFrozenImageUrl]){
aImagesSync.push(sFrozenImageUrl);
}
if(!Asc.editor.ImageLoader.map_image_index[sFrozenImageRotUrl]){
aImagesSync.push(sFrozenImageRotUrl);
}
if(aImagesSync.length > 0)
{
var old_val = api.ImageLoader.bIsAsyncLoadDocumentImages;
......@@ -2196,8 +2205,8 @@ function DrawingObjects() {
}
if ( !printOptions ) {
if ( aObjects.length ) {
if ( _this.controller.selectedObjects.length )
if ( aObjects.length || _this.drawingArea.frozenPlaces.length > 1) {
if ( _this.controller.selectedObjects.length || _this.drawingArea.frozenPlaces.length > 1)
{
_this.OnUpdateOverlay();
_this.controller.updateSelectionState(true);
......@@ -4762,4 +4771,6 @@ function CoordsManager(ws) {
window["AscFormat"].ClickCounter = ClickCounter;
window["AscFormat"].aSparklinesStyles = aSparklinesStyles;
window["AscFormat"].CSparklineView = CSparklineView;
window["AscFormat"].sFrozenImageUrl = sFrozenImageUrl;
window["AscFormat"].sFrozenImageRotUrl = sFrozenImageRotUrl;
})(window);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment