The map image moves in an unnatural manner when the map opens and closes.

  • Hello.

    When opening the map, the size is adjusted to fit the width and height of the screen.

    https://bamboograss.penne.jp/panorama_test_…V1/floor-1.html

    The map image moves in an unnatural manner when the map opens and closes.
    I have tried various methods but cannot find the cause.

    Can anyone give me some advice?


    "

    <!-- the map image -->
    <layer name="map" url="../skin_map/inmap.png" keep="true" handcursor="false" capture="false"
    align="lefttop"
    width= "30%"
    height= "prop"
    scale="1" scalechildren="true"
    onclick="openmap();"
    onloaded="
    set(layer-map-imagewidth,layer[map].imagewidth);
    showlog(); trace('layer-map-imagewidth-',get(layer-map-imagewidth));
    set(layer-map-imageheight,layer[map].imageheight);
    showlog(); trace('layer-map-imageheight-',get(layer-map-imageheight));"
    />

    <action name="openmap">
    set(layer[map].onclick, closemap(); );
    layer[map].changeorigin(center,center);
    showlog(); trace('a');
    set(bigscale,1);
    if(layer-map-imagewidth GT stagewidth, div(bigscale, stagewidth, get(layer-map-imagewidth)); );


    div(screenaspect, stagewidth, stageheight);
    div(imageaspect, get(layer-map-imagewidth), get(layer-map-imageheight));

    if(imageaspect GT screenaspect,

    set(layer[map].height,prop);
    tween(layer[map].x, 0);
    tween(layer[map].y, 0);
    tween(layer[map].width,80%);
    showlog(); trace('b');
    ,
    set(layer[map].width,prop);
    tween(layer[map].x, 0);
    tween(layer[map].y, 0);
    tween(layer[map].height,80%);
    showlog(); trace('c');
    );
    </action>

    <!-- map closing - -->
    <action name="closemap">
    set(layer[map].onclick, openmap(); );
    layer[map].changeorigin(lefttop,lefttop);
    tween(layer[map].x, 0);
    tween(layer[map].y, 0);
    tween(layer[map].width, 30%);
    set(layer[map].height,prop);
    </action>"

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!