Commit 2ce29df0 authored by techird's avatar techird

add compact mode

parent 6f062454
...@@ -8,7 +8,9 @@ KityMinder.LANG['zh-cn'] = { ...@@ -8,7 +8,9 @@ KityMinder.LANG['zh-cn'] = {
}, },
'theme': { 'theme': {
'classic': '脑图经典', 'classic': '脑图经典',
'classic-compact': '紧凑经典',
'snow': '温柔冷光', 'snow': '温柔冷光',
'snow-compact': '紧凑冷光',
'fish': '鱼骨图', 'fish': '鱼骨图',
'wire': '线框', 'wire': '线框',
'fresh-red': '清新红', 'fresh-red': '清新红',
......
KityMinder.registerTheme('classic', { ['classic', 'classic-compact'].forEach(function(name) {
'background': '#3A4144 url(ui/theme/default/images/grid.png) repeat', var compact = name == 'classic-compact';
'root-color': '#430', KityMinder.registerTheme(name, {
'root-background': '#e9df98', 'background': '#3A4144 url(ui/theme/default/images/grid.png) repeat',
'root-stroke': '#e9df98',
'root-font-size': 24, 'root-color': '#430',
'root-padding': [15, 25], 'root-background': '#e9df98',
'root-margin': [30, 100], 'root-stroke': '#e9df98',
'root-radius': 30, 'root-font-size': 24,
'root-space': 10, 'root-padding': compact ? [10, 25] : [15, 25],
'root-shadow': 'rgba(0, 0, 0, .25)', 'root-margin': compact ? [15, 25] : [30, 100],
'root-radius': 30,
'main-color': '#333', 'root-space': 10,
'main-background': '#a4c5c0', 'root-shadow': 'rgba(0, 0, 0, .25)',
'main-stroke': '#a4c5c0',
'main-font-size': 16, 'main-color': '#333',
'main-padding': [6, 20], 'main-background': '#a4c5c0',
'main-margin': 20, 'main-stroke': '#a4c5c0',
'main-radius': 10, 'main-font-size': 16,
'main-space': 5, 'main-padding': compact ? [5, 15] : [6, 20],
'main-shadow': 'rgba(0, 0, 0, .25)', 'main-margin': compact ? [5, 10] : 20,
'main-radius': 10,
'sub-color': 'white', 'main-space': 5,
'sub-background': 'transparent', 'main-shadow': 'rgba(0, 0, 0, .25)',
'sub-stroke': 'none',
'sub-font-size': 12, 'sub-color': 'white',
'sub-padding': [5, 10], 'sub-background': 'transparent',
'sub-margin': [15, 20], 'sub-stroke': 'none',
'sub-tree-margin': 30, 'sub-font-size': 12,
'sub-radius': 5, 'sub-padding': [5, 10],
'sub-space': 5, 'sub-margin': compact ? [5, 10] : [15, 20],
'sub-tree-margin': 30,
'connect-color': 'white', 'sub-radius': 5,
'connect-width': 2, 'sub-space': 5,
'main-connect-width': 3,
'connect-radius': 5, 'connect-color': 'white',
'connect-width': 2,
'selected-background': 'rgb(254, 219, 0)', 'main-connect-width': 3,
'selected-stroke': 'rgb(254, 219, 0)', 'connect-radius': 5,
'selected-color': 'black',
'selected-background': 'rgb(254, 219, 0)',
'marquee-background': 'rgba(255,255,255,.3)', 'selected-stroke': 'rgb(254, 219, 0)',
'marquee-stroke': 'white', 'selected-color': 'black',
'drop-hint-color': 'yellow', 'marquee-background': 'rgba(255,255,255,.3)',
'sub-drop-hint-width': 2, 'marquee-stroke': 'white',
'main-drop-hint-width': 4,
'root-drop-hint-width': 4, 'drop-hint-color': 'yellow',
'sub-drop-hint-width': 2,
'order-hint-area-color': 'rgba(0, 255, 0, .5)', 'main-drop-hint-width': 4,
'order-hint-path-color': '#0f0', 'root-drop-hint-width': 4,
'order-hint-path-width': 1,
'order-hint-area-color': 'rgba(0, 255, 0, .5)',
'text-selection-color': 'rgb(27,171,255)', 'order-hint-path-color': '#0f0',
'line-height':1.5 'order-hint-path-width': 1,
'text-selection-color': 'rgb(27,171,255)',
'line-height':1.5
});
}); });
\ No newline at end of file
KityMinder.registerTheme('snow', {
'background': '#3A4144 url(ui/theme/default/images/grid.png) repeat',
['snow', 'snow-compact'].forEach(function(name) {
'root-color': '#430', var compact = name == 'snow-compact';
'root-background': '#e9df98',
'root-stroke': '#e9df98', KityMinder.registerTheme(name, {
'root-font-size': 24, 'background': '#3A4144 url(ui/theme/default/images/grid.png) repeat',
'root-padding': [15, 25],
'root-margin': 30, 'root-color': '#430',
'root-radius': 5, 'root-background': '#e9df98',
'root-space': 10, 'root-stroke': '#e9df98',
'root-shadow': 'rgba(0, 0, 0, .25)', 'root-font-size': 24,
'root-padding': compact ? [5, 10] : [15, 25],
'main-color': '#333', 'root-margin': compact ? 15 : 30,
'main-background': '#a4c5c0', 'root-radius': 5,
'main-stroke': '#a4c5c0', 'root-space': 10,
'main-font-size': 16, 'root-shadow': 'rgba(0, 0, 0, .25)',
'main-padding': [6, 20],
'main-margin': [20, 40], 'main-color': '#333',
'main-radius': 5, 'main-background': '#a4c5c0',
'main-space': 5, 'main-stroke': '#a4c5c0',
'main-shadow': 'rgba(0, 0, 0, .25)', 'main-font-size': 16,
'main-padding': compact ? [4, 10] : [6, 20],
'sub-color': 'black', 'main-margin': compact ? [5, 10] : [20, 40],
'sub-background': 'white', 'main-radius': 5,
'sub-stroke': 'white', 'main-space': 5,
'sub-font-size': 12, 'main-shadow': 'rgba(0, 0, 0, .25)',
'sub-padding': [5, 10],
'sub-margin': [10, 20], 'sub-color': 'black',
'sub-radius': 5, 'sub-background': 'white',
'sub-space': 5, 'sub-stroke': 'white',
'sub-font-size': 12,
'connect-color': 'white', 'sub-padding': [5, 10],
'connect-width': 2, 'sub-margin': compact ? [5, 10] : [10, 20],
'main-connect-width': 3, 'sub-radius': 5,
'connect-radius': 5, 'sub-space': 5,
'selected-background': 'rgb(254, 219, 0)', 'connect-color': 'white',
'selected-stroke': 'rgb(254, 219, 0)', 'connect-width': 2,
'main-connect-width': 3,
'marquee-background': 'rgba(255,255,255,.3)', 'connect-radius': 5,
'marquee-stroke': 'white',
'selected-background': 'rgb(254, 219, 0)',
'drop-hint-color': 'yellow', 'selected-stroke': 'rgb(254, 219, 0)',
'drop-hint-width': 4,
'marquee-background': 'rgba(255,255,255,.3)',
'order-hint-area-color': 'rgba(0, 255, 0, .5)', 'marquee-stroke': 'white',
'order-hint-path-color': '#0f0',
'order-hint-path-width': 1, 'drop-hint-color': 'yellow',
'drop-hint-width': 4,
'text-selection-color': 'rgb(27,171,255)',
'line-height':1.5 'order-hint-area-color': 'rgba(0, 255, 0, .5)',
'order-hint-path-color': '#0f0',
'order-hint-path-width': 1,
'text-selection-color': 'rgb(27,171,255)',
'line-height':1.5
});
}); });
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment