Taking into account positionLeftConfirmation
and positionTopConfirmation
coordinates a confirmation dialog box's upper left corner. If you want this confirmation dialog to be centered inside the parent, its left coordinate will be:
positionLeftConfirmation = positionLeft (parent dialog) + parentDialogWidth / 2 - dialogWidth / 2.
In your case parentDialogWidth = 350 and dialogWidth = 330, so
this.positionLeftConfirmation = this.positionLeft + (350-330)/2;
Similarly
this.positionTopConfirmation = this.positionTop + (300-200)/2;
See working plunker
source
share