# HG changeset patch # User ymh # Date 1484066190 -3600 # Node ID 2b9c120dba55b556fc991151d75690ced870e141 # Parent e388117572d868c238495a7238ecca60b28daa03 first implementation of node title size and color diff -r e388117572d8 -r 2b9c120dba55 client/css/renkan.css --- a/client/css/renkan.css Thu Jan 05 19:34:53 2017 +0100 +++ b/client/css/renkan.css Tue Jan 10 17:36:30 2017 +0100 @@ -341,12 +341,40 @@ } .Rk-Label { - position: absolute; width: 160px; margin-left: -80px; text-align: center; font-size: 13px; line-height: 13px; + position: absolute; width: 160px; margin-left: -80px; text-align: center; +} + +/* Separate this declaration to isolate the node title size */ +.Rk-Label { + font-size: 13px; line-height: 13px; +} + +/* Node label size +1 */ +.Rk-Label-p1 { + font-size: 14px; line-height: 14px; +} + +/* Node label size +2 */ +.Rk-Label-p2 { + font-size: 15px; line-height: 15px; +} + +/* Node label size -1 */ +.Rk-Label-m1 { + font-size: 12px; line-height: 12px; +} + +/* Node label size -2 */ +.Rk-Label-m2 { + font-size: 11px; line-height: 11px; } .Rk-Edge-Label { - font-size: 11px; transform-origin: 50% 0; -moz-transform-origin: 50% 0; - -webkit-transform-origin: 50% 0; -ms-transform-origin: 50% 0; + font-size: 11px; + transform-origin: 50% 0; + -ms-transform-origin: 50% 0; + -moz-transform-origin: 50% 0; + -webkit-transform-origin: 50% 0; } /* Editors */ @@ -489,6 +517,35 @@ left: -105px; top: 2px; } +.Rk-Editor-p-title-color .Rk-Edit-ColorPicker { + left: 67px; top: 114px; +} + +.Rk-Editor-p-title-style { + width: 100%; +} + +.Rk-Editor-p-title-style .Rk-Editor-Label { + width: 50px; +} + +.Rk-Editor-p-title-style div { + float: left; +} + +.Rk-Editor-p-title-style .Rk-Editor-p-title-color { + width: 40%; +} + +.Rk-Editor-p-title-color .Rk-Edit-Color { + margin-top: 2px; +} + +.Rk-Editor-p-title-style .Rk-Editor-p-title-size { + width: 60%; +} + + .Rk-Edit-ColorPicker-Text { color: #303080; font-weight: bold; } diff -r e388117572d8 -r 2b9c120dba55 client/js/defaults.js --- a/client/js/defaults.js Thu Jan 05 19:34:53 2017 +0100 +++ b/client/js/defaults.js Tue Jan 10 17:36:30 2017 +0100 @@ -126,8 +126,18 @@ selected_node_stroke_width: 4, selected_node_stroke_max_width: 24, node_stroke_witdh_scale: 5, + node_title_size_min: 0, + /* minimum relative size for node title (in graph) */ + node_title_size_max: 5, + /* maximum relative size for node title (in graph) */ + node_title_size_step: 0.1, + /* step for relative size for node title (in graph) */ node_fill_color: "#ffffff", + /* default color to fill node background */ highlighted_node_fill_color: "#ffff00", + /* default color to fill highlighted node background */ + node_title_color: "#000000", + /* default title color */ node_label_distance: 5, /* Vertical distance between node and label */ node_label_max_length: 60, @@ -190,13 +200,14 @@ /* NODE EDITOR OPTIONS */ + show_node_title_style: true, show_node_editor_uri: true, show_node_editor_title: true, show_node_editor_title_richtext: true, show_node_editor_description: true, show_node_editor_description_richtext: true, show_node_editor_size: true, - show_node_editor_style: true, + show_node_editor_style: true, // show node title style editor show_node_editor_style_color: true, show_node_editor_style_dash: true, show_node_editor_style_thickness: true, diff -r e388117572d8 -r 2b9c120dba55 client/js/i18n.js --- a/client/js/i18n.js Thu Jan 05 19:34:53 2017 +0100 +++ b/client/js/i18n.js Tue Jan 10 17:36:30 2017 +0100 @@ -98,6 +98,8 @@ "Show hidden nodes": "Montrer les noeuds cachés", "Show neighbors": "Montrer les voisins", "Hide": "Cacher", - "Fullscreen not supported by your browser": "Le plein écran n'est pas supporté par votre navigateur" + "Fullscreen not supported by your browser": "Le plein écran n'est pas supporté par votre navigateur", + "Title size:": "Taille :", + "Title color:": "Couleur :", } }; diff -r e388117572d8 -r 2b9c120dba55 client/js/main.js --- a/client/js/main.js Thu Jan 05 19:34:53 2017 +0100 +++ b/client/js/main.js Tue Jan 10 17:36:30 2017 +0100 @@ -151,14 +151,14 @@ } }); - this.colorPicker = (function() { + this.colorPicker = function(pickerClass) { var _tmpl = _this.options.templates['templates/colorpicker.html']; - return '