">mixi Developer Center (mDC)

mixi Apps

mixi Apps (English) » Technical Specification (new method) » PC » Display Adjustment

Display Adjustment

In a mixi App, robust content should be provided to users even within a limited display field. Therefore, unnecessary blank spaces and/or content that cannot be shown in the mixi App can ruins the user experience. The page area can be automatically adjusted in the mixi App and displayed properly.

adjustheight

Size of a mixi App

The new method of a mixi App is only provided on run_appli.pl (canvas view)
The maximum size of the display area on run_appli.pl is as followings.

Maximum width 945px(*)
Maximum height over 600px(*)

* The maximum width is 760px if it introduces the mixi AD program (advertisement). 
* Regarding the 760px wide mixi app created before 2013/4/17, it is not able to display with the maximum 945px wide.
* The available size of maximum height is dependent on a browser.

Adjusting height

The contents which a mixi app displays are various. Although the width is fixed, the height of each mixi App is variable. At this point, it is very convenient if the mixi app automatically adjusts the proper height based on the displayed contents. 

In OpenSocial, the gadgets.window.adjustHeight() function is provided to adjust its height. 

gadgets.window.adjustHeight(height);

The assigned parameter is as below

Parameter Assigned value
height Height (px). When it is omitted, it is automatically adjusted according to the contents called. 

You need to finish Preparing to use the JavaScript API because the function is provided by the JavaScript API.
The size of the display area is changed immediately after calling the adjustHeight(). In the case of adjusting display area when the mixi App is launched, the adjustHeight() should be called after finishing general communication and DOM operations for images and/or strings.

TOP OF THIS PAGE