Your IP : 18.216.212.231


Current Path : /var/www/www-root/data/www/monolith-realty.ru/bitrix/js/landing/history/src/action/
Upload File :
Current File : /var/www/www-root/data/www/monolith-realty.ru/bitrix/js/landing/history/src/action/remove-block.js

const {scrollTo, highlight} = BX.Landing.Utils;

/**
 * @param {object} entry
 * @return {Promise}
 */
export default function removeBlock(entry)
{
	return BX.Landing.PageObject.getInstance().blocks()
		.then((blocks) => {
			const block = blocks.get(entry.block);
			block.forceInit();

			return scrollTo(block.node)
				.then(() => {
					highlight(block.node);
					return block.deleteBlock(true);
				});
		});
}