You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: improve TypeScript type definitions with optional parameters (#665)
* feat: improve TypeScript type definitions with optional parameters
- Convert required configuration fields to optional in JsMindRuntimeOptions
- Add support for 'visible' value in node_overflow option
- Update type definitions to match official documentation examples
- Enhance test coverage for optional parameters and new type features
- Improve API flexibility by making most options optional except container
- Update JSDoc comments to reflect optional parameter changes
* docs: fix JSDoc direction parameter types to match Direction.of() implementation
- Update direction parameter JSDoc in add_node, insert_node_before, insert_node_after, move_node functions
- Add support for numeric strings ('-1', '0', '1') and numbers (-1, 0, 1) in addition to string values
- Document that Direction.of() function supports multiple input types as shown in jsmind.common.js
- Improve API documentation accuracy and developer experience
* @param {string=} before_id - The ID of the node before which to place the moved node. Special values: "_first_", "_last_"
588
595
* @param {string=} parent_id
589
-
* @param {number=} direction
596
+
* @param {('left'|'center'|'right'|'-1'|'0'|'1'|number)=} direction - Direction for node placement. Supports string values ('left', 'center', 'right'), numeric strings ('-1', '0', '1'), and numbers (-1, 0, 1). Only effective for second-level nodes (children of root). If not provided, direction will be determined automatically.
590
597
*/
591
598
move_node(node_id,before_id,parent_id,direction){
592
599
if(this.get_editable()){
@@ -648,7 +655,10 @@ export default class jsMind {
0 commit comments