Colleagues, the question about the button fullscreen Control. I have this button does not work. What am I doing wrong? My goal is to display the map displayed in the iframe in full screen. Now nothing is happening.
<iframe src="http://127.0.0.1/yandex-map/" width="100%" height="500px" scrolling="no"></iframe> ...
var fullscreenControl = new ymaps.control.Button({ data: { iconType: 'expand', title: "Развернуть/свернуть карту" }, options: { selectOnClick: false, float: "right" } }); fullscreenControl.events.add("press" ,function (){ if (!fullscreenControl.isSelected()) myMap.container.enterFullscreen(); else myMap.container.exitFullscreen(); }); myMap.container.events.add("fullscreenenter" ,function() { fullscreenControl.data.set({iconType:"collapse"}); fullscreenControl.select(); console.log('fullscreenenter'); }); myMap.container.events.add("fullscreenexit" ,function() { fullscreenControl.data.set({iconType:"expand"}); fullscreenControl.deselect(); console.log('fullscreenexit'); }); myMap.controls.add(fullscreenControl);