MZ (Solved) Sprite Icons not on item index

I need some help on some code (as this is a WIP)

for MV, I use to refresh, update and drawItemName like this:
JavaScript:
        SDJB_Base["AniIcon"][name + "_drawItemName"] = winClass.prototype.drawItemName;
            winClass.prototype.drawItemName = function(item, x, y, width) {
                if (item?.animatedIcon?.valid) {
                    const iconW = ImageManager.iconWidth; //+4;
                    this.resetTextColor();
                    this.drawText(item.name, x + iconW, y, width - iconW);
                    return;
                }
                return SDJB_Base["AniIcon"][name + "_drawItemName"].call(this, item, x, y, width);
            };

while MV sprite icons works nicely I continue to get the same thing done in MZ.

Now, in MZ, the sprite icons draw nicely, but in MZ they stack in the upper left corner of the window.
but not on the index of "this._data" for the Window_ItemList, Window_ShopBuy etc that inherit from
Window_ItemList.

how can I do the indexing for MZ to make it set next to the items name?

as I don't get the MZ version as it does have the data, like MV, but MZ fails to work, why?

Edit:
forgot the offset function uses itemRectForText (MV) which is itemLineRect for MZ!

this is annoying why there is a small naming different....

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/solved-sprite-icons-not-on-item-index.181272/