updated JS widget code of annotation