Error in demo project - Profile Picture

Blazor Image Editor Profile Picture Example - Syncfusion Demos


Hello!

In de profile picture sample have a error in the JS Method 


applyImage: function (a) {
        var dataId = document.querySelector('.e-image-editor').getAttribute('dataId');
        var inst = window.sfBlazor.getCompInstance(dataId).imageEditorBase;
        var croppedData = inst.getImageData();
        var canvas = document.querySelector('#img-canvas');
        var ctx = canvas.getContext('2d');
        var parentDiv = document.querySelector('.e-profile');
        var tempCanvas = parentDiv.appendChild(document.createElement('canvas'));
        var tempContext = tempCanvas.getContext('2d');
        tempCanvas.width = croppedData.width; tempCanvas.height = croppedData.height;
        tempContext.putImageData(croppedData, 0, 0);
        ctx.clearRect(0, 0, canvas.width, canvas.height);
        ctx.drawImage(tempCanvas, 0, 0, canvas.width, canvas.height);
        tempCanvas.remove();
        if (canvasInterop.imgSrc !== '') {
            const img = document.querySelector('#custom-img');
            img.src = canvasInterop.imgSrc;
        }
        return true;
    }

the correct is 

var inst = window.sfBlazor.getCompInstance(dataId);

Without imageEditorBase Thanks!

2 Replies

BS Buvana Sathasivam Syncfusion Team February 17, 2025 06:18 AM UTC

Hi Marcelo,


Thank you for bringing this to our attention. We have noted the issue and will be correcting the demo site accordingly. The update will be included in our Volume 1 main release, which is scheduled for rollout by the end of March 2025.


We appreciate your feedback and patience as we work on this.


Regards,

Buvana S




BS Buvana Sathasivam Syncfusion Team April 2, 2025 01:37 PM UTC

Hi Marcelo,


Thank you for your patience.


We’ve updated and refreshed the documentation as requested. For your convenience, you can access the updated demo site using the link below:

Refreshed Demo Site


Please let us know if you have any further questions or need additional assistance. We’re here to help!


Best regards,
Buvana S


Loader.
Up arrow icon