When add Image as a Background its show white line in the right side in Fabric.js

The issue is when I add a background image with the below method, and then after Zoom Canvas there is an issue when the zoom ratio is odd, like 5%, 7%, 11%, etc.; it shows a white line at the end of the right side but does not show a white line when the canvas size is even. Why has this happened? I actually don’t know

Backgroud Image Add Code

   var left, top, scaleFactor;
                await this.getMeta(this.props.canvasImage).then((results: any) => {
                    this.props.canvasImage = results.src;
                    if (results) {
                        var canvasAspect = this.zoomWidthRef / this.zoomHeightRef;
                        var imgAspect = results.width / results.height;
                        if (canvasAspect >= imgAspect) {
                            scaleFactor = this.zoomWidthRef / results.width;
                            left = 0;
                            top = -((results.height * scaleFactor) - this.zoomHeightRef) / 2;
                        } else {
                            scaleFactor = this.zoomHeightRef / results.height;
                            top = 0;
                            left = -((results.width * scaleFactor) - this.zoomWidthRef) / 2;
                        }
                    }
                });
                var option = {
                    top: top,
                    left: left,
                    scaleX: scaleFactor,
                    scaleY: scaleFactor,
                    crossOrigin: 'anonymous',
                    isFromServer: server_resource,
                    stockphotodetail: item,
                    uploadFrom: uploadSource,
                    scaleMode: 'Scale Crop'
                }
                this.setBackground(option);
                
                setBackground(option) {
        var self = this;
        if (option) {

            FabricImage.fromURL(this.props.canvasImage, { crossOrigin: 'anonymous' }, option).then((img) => {

                const imgElement = img._originalElement as HTMLImageElement;

                // Check if the loaded background image dimensions need to be scaled
                if (img.height !== imgElement.naturalHeight) {
                    img.scaleY = img.height / imgElement.naturalHeight;
                    img.scaleX = img.width / imgElement.naturalWidth;
                    img.height = imgElement.naturalHeight;
                    img.width = imgElement.naturalWidth;
                }

                // Set the image as the background image
                self.canvas.backgroundImage = img;
                self.canvas.renderAll();

                // Set the background color to transparent (or other canvas fill)
                self.props.canvasFill = transparentColor;
                self.canvas.backgroundColor = self.props.canvasFill;

                // Additional operations
                self.resetGradient();
                self.canvas.remove(self.getElementById('pattern'));
                self.canvas.renderAll();

                // Other updates to canvas state
                self.renderStackObjects('remove_bg');
                self.canvasModified = true;
                self._config.disableUndo = false;
                self._config.disableRedo = false;
                self.updateCanvasState();
            })
                .catch((error) => {
                    console.error('Error loading background image:', error);
                });
            // Flag to indicate background image is set
            this.isBgImg = true;
        }
    }

Zoom Change With Mouse Wheel Event

document.addEventListener(
            "wheel", function (e) {
                if (that.p && that.p.isOpen()) {
                    that.popovers.forEach((popover: NgbPopover) => {
                        popover.close();
                    });
                }

                e.stopPropagation();
                const targetElement = e.target;
                if (targetElement.classList.contains('canvas-container2') || targetElement.classList.contains('upper-canvas')) {
                    if (((e.ctrlKey && !that.isCropingEnable) || (!e.ctrlKey && e.deltaY < 0 && e.deltaY && !Number.isInteger(e.deltaY) && window.innerWidth <= 1550 && !that.isCropingEnable))) {
                        e.preventDefault();
                        const { deltaY } = e;
                        let isTrackpad = false;
                        if (deltaY && !Number.isInteger(deltaY)) {
                            isTrackpad = true;
                        }
                        else {
                            isTrackpad = false;
                        }
                        var zoom = that.canvas.getZoom();
                        var delta = e.deltaY;
                        if (isTrackpad) zoom += e.deltaY * -0.01;
                        if (!isTrackpad) zoom *= 0.999 ** delta;
                        zoom > 3.00 ? zoom = 3.00 : '';
                        zoom < 0.10 ? zoom = 0.10 : '';
                        that.setZoomFromOption(Math.floor(zoom * 100));
                    }
                }
            },
            {
                passive: false
            }

        );
        
        
        
           let zoomlevel = this.zoomLevel / 100;
            this.canvas.setZoom(zoomlevel);
            this.canvas.setDimensions({
                width: Math.round(this.zoomWidthRef * zoomlevel),
                height: Math.round(this.zoomHeightRef * zoomlevel)
            })
            this.canvas.calcOffset();

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật