mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 06:07:57 +01:00
Format some .js.
This commit is contained in:
parent
113a93f48a
commit
9caa90db63
@ -229,6 +229,7 @@ mindplot.Designer = new Class(/** @lends Designer */{
|
||||
* connected, added to the drag manager, with events registered - complying type & read mode
|
||||
*/
|
||||
_buildNodeGraph: function (model, readOnly) {
|
||||
|
||||
// Create node graph ...
|
||||
var topic = mindplot.NodeGraph.create(model, {readOnly: readOnly});
|
||||
this.getModel().addTopic(topic);
|
||||
|
@ -211,5 +211,5 @@ mindplot.DragTopic.__getDragPivot = function () {
|
||||
mindplot.DragTopic._dragPivot = result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -29,7 +29,14 @@ mindplot.IconGroup = new Class(/**@lends IconGroup */{
|
||||
$assert($defined(iconSize), "iconSize can not be null");
|
||||
|
||||
this._icons = [];
|
||||
this._group = new web2d.Group({width:0, height:iconSize, x:0, y:0, coordSizeWidth:0, coordSizeHeight:100});
|
||||
this._group = new web2d.Group({
|
||||
width: 0,
|
||||
height: iconSize,
|
||||
x: 0,
|
||||
y: 0,
|
||||
coordSizeWidth: 0,
|
||||
coordSizeHeight: 100
|
||||
});
|
||||
this._removeTip = new mindplot.IconGroup.RemoveTip(this._group, topicId);
|
||||
this.seIconSize(iconSize, iconSize);
|
||||
|
||||
|
@ -107,27 +107,57 @@ mindplot.ImageIcon.prototype.ICON_FAMILIES = [
|
||||
{"id": "face", "icons": ["face_plain", "face_sad", "face_crying", "face_smile", "face_surprise", "face_wink"]},
|
||||
{"id": "funy", "icons": ["funy_angel", "funy_devilish", "funy_glasses", "funy_grin", "funy_kiss", "funy_monkey"]},
|
||||
{"id": "conn", "icons": ["conn_connect", "conn_disconnect"]},
|
||||
{"id":"sport", "icons":["sport_basketball", "sport_football", "sport_golf", "sport_raquet", "sport_shuttlecock", "sport_soccer", "sport_tennis"]},
|
||||
{
|
||||
"id": "sport",
|
||||
"icons": ["sport_basketball", "sport_football", "sport_golf", "sport_raquet", "sport_shuttlecock", "sport_soccer", "sport_tennis"]
|
||||
},
|
||||
{"id": "bulb", "icons": ["bulb_light_on", "bulb_light_off"]},
|
||||
{"id": "thumb", "icons": ["thumb_thumb_up", "thumb_thumb_down"]},
|
||||
{"id": "tick", "icons": ["tick_tick", "tick_cross"]},
|
||||
{"id":"onoff", "icons":["onoff_clock", "onoff_clock_red", "onoff_add", "onoff_delete", "onoff_status_offline", "onoff_status_online"]},
|
||||
{"id":"money", "icons":["money_money", "money_dollar", "money_euro", "money_pound", "money_yen", "money_coins", "money_ruby"]},
|
||||
{
|
||||
"id": "onoff",
|
||||
"icons": ["onoff_clock", "onoff_clock_red", "onoff_add", "onoff_delete", "onoff_status_offline", "onoff_status_online"]
|
||||
},
|
||||
{
|
||||
"id": "money",
|
||||
"icons": ["money_money", "money_dollar", "money_euro", "money_pound", "money_yen", "money_coins", "money_ruby"]
|
||||
},
|
||||
{"id": "time", "icons": ["time_calendar", "time_clock", "time_hourglass"]},
|
||||
{"id":"number", "icons":["number_1", "number_2", "number_3", "number_4", "number_5", "number_6", "number_7", "number_8", "number_9"]},
|
||||
{
|
||||
"id": "number",
|
||||
"icons": ["number_1", "number_2", "number_3", "number_4", "number_5", "number_6", "number_7", "number_8", "number_9"]
|
||||
},
|
||||
{"id": "chart", "icons": ["chart_bar", "chart_line", "chart_curve", "chart_pie", "chart_organisation"]},
|
||||
{"id": "sign", "icons": ["sign_warning", "sign_info", "sign_stop", "sign_help", "sign_cancel"]},
|
||||
{"id":"hard", "icons":["hard_cd", "hard_computer", "hard_controller", "hard_driver_disk", "hard_ipod", "hard_keyboard", "hard_mouse", "hard_printer"]},
|
||||
{"id":"soft", "icons":["soft_bug", "soft_cursor", "soft_database_table", "soft_database", "soft_feed", "soft_folder_explore", "soft_rss", "soft_penguin"]},
|
||||
{
|
||||
"id": "hard",
|
||||
"icons": ["hard_cd", "hard_computer", "hard_controller", "hard_driver_disk", "hard_ipod", "hard_keyboard", "hard_mouse", "hard_printer"]
|
||||
},
|
||||
{
|
||||
"id": "soft",
|
||||
"icons": ["soft_bug", "soft_cursor", "soft_database_table", "soft_database", "soft_feed", "soft_folder_explore", "soft_rss", "soft_penguin"]
|
||||
},
|
||||
{"id": "arrow", "icons": ["arrow_up", "arrow_down", "arrow_left", "arrow_right"]},
|
||||
{"id":"arrowc", "icons":["arrowc_rotate_anticlockwise", "arrowc_rotate_clockwise", "arrowc_turn_left", "arrowc_turn_right"]},
|
||||
{
|
||||
"id": "arrowc",
|
||||
"icons": ["arrowc_rotate_anticlockwise", "arrowc_rotate_clockwise", "arrowc_turn_left", "arrowc_turn_right"]
|
||||
},
|
||||
{"id": "people", "icons": ["people_group", "people_male1", "people_male2", "people_female1", "people_female2"]},
|
||||
{"id": "mail", "icons": ["mail_envelop", "mail_mailbox", "mail_edit", "mail_list"]},
|
||||
{"id": "flag", "icons": ["flag_blue", "flag_green", "flag_orange", "flag_pink", "flag_purple", "flag_yellow"]},
|
||||
{"id":"bullet", "icons":["bullet_black", "bullet_blue", "bullet_green", "bullet_orange", "bullet_red", "bullet_pink", "bullet_purple"]},
|
||||
{
|
||||
"id": "bullet",
|
||||
"icons": ["bullet_black", "bullet_blue", "bullet_green", "bullet_orange", "bullet_red", "bullet_pink", "bullet_purple"]
|
||||
},
|
||||
{"id": "tag", "icons": ["tag_blue", "tag_green", "tag_orange", "tag_red", "tag_pink", "tag_yellow"]},
|
||||
{"id":"object", "icons":["object_bell", "object_clanbomber", "object_key", "object_pencil", "object_phone", "object_magnifier", "object_clip", "object_music", "object_star", "object_wizard", "object_house", "object_cake", "object_camera", "object_palette", "object_rainbow"]},
|
||||
{"id":"weather", "icons":["weather_clear-night", "weather_clear", "weather_few-clouds-night", "weather_few-clouds", "weather_overcast", "weather_severe-alert", "weather_showers-scattered", "weather_showers", "weather_snow", "weather_storm"]},
|
||||
{
|
||||
"id": "object",
|
||||
"icons": ["object_bell", "object_clanbomber", "object_key", "object_pencil", "object_phone", "object_magnifier", "object_clip", "object_music", "object_star", "object_wizard", "object_house", "object_cake", "object_camera", "object_palette", "object_rainbow"]
|
||||
},
|
||||
{
|
||||
"id": "weather",
|
||||
"icons": ["weather_clear-night", "weather_clear", "weather_few-clouds-night", "weather_few-clouds", "weather_overcast", "weather_severe-alert", "weather_showers-scattered", "weather_showers", "weather_snow", "weather_storm"]
|
||||
},
|
||||
{"id": "task", "icons": ["task_0", "task_25", "task_50", "task_75", "task_100"]}
|
||||
];
|
||||
|
||||
|
@ -259,30 +259,30 @@ mindplot.MultilineTextEditor = new Class({
|
||||
|
||||
_positionCursor: function (textareaElem, selectText) {
|
||||
textareaElem.focus();
|
||||
var lenght = textareaElem.val().length;
|
||||
var lengh = textareaElem.val().length;
|
||||
if (selectText) {
|
||||
// Mark text as selected ...
|
||||
if (textareaElem.createTextRange) {
|
||||
var rang = textareaElem.createTextRange();
|
||||
rang.select();
|
||||
rang.move("character", lenght);
|
||||
rang.move("character", lengh);
|
||||
}
|
||||
else {
|
||||
textareaElem[0].setSelectionRange(0, lenght);
|
||||
textareaElem[0].setSelectionRange(0, lengh);
|
||||
}
|
||||
|
||||
} else {
|
||||
// Move the cursor to the last character ..
|
||||
if (textareaElem.createTextRange) {
|
||||
var range = textareaElem.createTextRange();
|
||||
range.move("character", lenght);
|
||||
range.move("character", lengh);
|
||||
} else {
|
||||
if (Browser.ie11) {
|
||||
textareaElem[0].selectionStart = lenght;
|
||||
textareaElem[0].selectionEnd = lenght;
|
||||
textareaElem[0].selectionStart = lengh;
|
||||
textareaElem[0].selectionEnd = lengh;
|
||||
} else {
|
||||
textareaElem.selectionStart = lenght;
|
||||
textareaElem.selectionEnd = lenght;
|
||||
textareaElem.selectionStart = lengh;
|
||||
textareaElem.selectionEnd = lengh;
|
||||
}
|
||||
textareaElem.focus();
|
||||
}
|
||||
|
@ -205,8 +205,7 @@ mindplot.NodeGraph.create = function(nodeModel, options) {
|
||||
var result;
|
||||
if (type == mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) {
|
||||
result = new mindplot.CentralTopic(nodeModel, options);
|
||||
} else
|
||||
if (type == mindplot.model.INodeModel.MAIN_TOPIC_TYPE) {
|
||||
} else if (type == mindplot.model.INodeModel.MAIN_TOPIC_TYPE) {
|
||||
result = new mindplot.MainTopic(nodeModel, options);
|
||||
} else {
|
||||
$assert(false, "unsupported node type:" + type);
|
||||
|
@ -31,7 +31,8 @@ mindplot.TextEditor = new Class({
|
||||
display: "none",
|
||||
zIndex: "8",
|
||||
width: "500px",
|
||||
height:"100px"}
|
||||
height: "100px"
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@ -43,9 +44,11 @@ mindplot.TextEditor = new Class({
|
||||
inputContainer.inject(result);
|
||||
|
||||
var inputText = new Element('input',
|
||||
{type:"text",
|
||||
{
|
||||
type: "text",
|
||||
tabindex: '-1',
|
||||
value:""}
|
||||
value: ""
|
||||
}
|
||||
);
|
||||
inputText.setStyles({
|
||||
border: "none",
|
||||
|
@ -17,11 +17,20 @@
|
||||
*/
|
||||
|
||||
core.Point = new Class({
|
||||
/**
|
||||
* @constructs
|
||||
* @param {Number} x coordinate
|
||||
* @param {Number} y coordinate
|
||||
*/
|
||||
initialize: function (x, y) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {Number} x coordinate
|
||||
* @param {Number} y coordinate
|
||||
*/
|
||||
setValue: function (x, y) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
|
@ -22,8 +22,10 @@ web2d.Workspace = new Class({
|
||||
this._htmlContainer = this._createDivContainer();
|
||||
|
||||
var peer = web2d.peer.Toolkit.createWorkspace(this._htmlContainer);
|
||||
var defaultAttributes = {width: '200px', height: '200px', stroke: '1px solid #edf1be',
|
||||
fillColor: "white", coordOrigin: '0 0', coordSize: '200 200' };
|
||||
var defaultAttributes = {
|
||||
width: '200px', height: '200px', stroke: '1px solid #edf1be',
|
||||
fillColor: "white", coordOrigin: '0 0', coordSize: '200 200'
|
||||
};
|
||||
for (var key in attributes) {
|
||||
defaultAttributes[key] = attributes[key];
|
||||
}
|
||||
@ -34,6 +36,7 @@ web2d.Workspace = new Class({
|
||||
getType: function () {
|
||||
return "Workspace";
|
||||
},
|
||||
|
||||
/**
|
||||
* Appends an element as a child to the object.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user