File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
app/src/core/service/controlService/controller/concrete Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { Settings } from "@/core/service/Settings";
44import { PenStroke , PenStrokeSegment } from "@/core/stage/stageObject/entity/PenStroke" ;
55import { TextNode } from "@/core/stage/stageObject/entity/TextNode" ;
66import { isMac } from "@/utils/platform" ;
7- import { Color , Vector } from "@graphif/data-structures" ;
7+ import { Color , mixColors , Vector } from "@graphif/data-structures" ;
88import { toast } from "sonner" ;
99
1010/**
@@ -68,7 +68,12 @@ export class ControllerPenStrokeDrawingClass extends ControllerClass {
6868 const entity = this . project . stageManager . findEntityByLocation ( releaseWorldLocation ) ;
6969 if ( entity ) {
7070 if ( entity instanceof TextNode ) {
71- entity . color = this . getCurrentStrokeColor ( ) . clone ( ) ;
71+ if ( this . project . controller . pressingKeySet . has ( "shift" ) ) {
72+ const entityColor = entity . color . clone ( ) ;
73+ entity . color = mixColors ( entityColor , this . getCurrentStrokeColor ( ) . clone ( ) , 0.1 ) ;
74+ } else {
75+ entity . color = this . getCurrentStrokeColor ( ) . clone ( ) ;
76+ }
7277 }
7378 }
7479 this . releaseMouseAndClear ( ) ;
You can’t perform that action at this time.
0 commit comments