Merge branch 'master' of git.code.tencent.com:jl-framework/graphic-pixi

This commit is contained in:
Yuan 2023-08-28 10:09:44 +08:00
commit 6dde86d63f

View File

@ -14,6 +14,10 @@ export interface IMouseToolOptions {
* ,
*/
boxSelect?: boolean;
/**
* --
*/
boxSelectColor?: string;
/**
* (),
*/
@ -32,6 +36,7 @@ class CompleteMouseToolOptions implements IMouseToolOptions {
boxSelect: boolean;
viewportDrag: boolean;
wheelZoom: boolean;
boxSelectColor?: string;
selectFilter?: GraphicSelectFilter | undefined;
constructor() {
this.boxSelect = true;
@ -48,6 +53,7 @@ class CompleteMouseToolOptions implements IMouseToolOptions {
if (options.wheelZoom != undefined) {
this.wheelZoom = options.wheelZoom;
}
this.boxSelectColor = options.boxSelectColor;
this.selectFilter = options.selectFilter;
}
}
@ -287,7 +293,7 @@ export class CommonMouseTool extends AppInteractionPlugin {
if (!this.drag) return;
// 绘制框选矩形框
this.box.clear();
this.box.lineStyle({ width: 1, color: 0x000000 });
this.box.lineStyle({ width: 1, color: this.options.boxSelectColor });
const dsx = end.x - start.x;
const dsy = end.y - start.y;
let { x, y } = start;