-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Clipping Group with shadows will result in the loss of the canvas background. #9527
Comments
seems related to caching |
Lines 418 to 429 in 82d94b4
|
@ShaMan123 shouldCache() {
const ownCache = FabricObject.prototype.shouldCache.call(this);
if (ownCache) {
for (let i = 0; i < this._objects.length; i++) {
if (this._objects[i].willDrawShadow()) {
this._objects[i].dirty = true;
}
}
}
return ownCache;
} |
In that case I would do
|
@ShaMan123 key === 'dirty' && this.forEachObject(obj => obj.dirty = true)) |
Good catch, we should PR to fix - } else if (key === 'dirty' && this.group) {
+ } else if (key === 'dirty' && value && this.group) { |
Not sure actually |
- } else if (key === 'dirty' && this.group) {
+ } else if (key === 'dirty' && this.group && isChanged) { This should work I think |
It should occur only when try so the initial approach is correct |
CheckList
Version
6.0.0-beta16
In What environments are you experiencing the problem?
No response
Node Version (if applicable)
None
Link To Reproduction
demo
Steps To Reproduce
Expected Behavior
The rectangle will be clipped if it exceeds the boundaries of the frame.
Actual Behavior
rt.
I have created an online demo, which contains two files. One is 'test-clip' which behaves normally, and the other is 'test-clip-shadow' which behaves abnormally.
demo
Error Message & Stack Trace
No response
The text was updated successfully, but these errors were encountered: