Ticket #761 (closed Defect: fixed)

Opened 6 years ago

Last modified 6 years ago

Box Renderer: store color and expansion flag per-topicmap

Reported by: jri Owned by: jri
Priority: Major Milestone: Release 4.6
Component: DeepaMehta Standard Distribution Version: 4.5
Keywords: Cc: dgf, Malte
Complexity: 3 Area: Application Framework / API
Module: deepamehta-topicmaps

Description

Currently the color and expansion flag (represented by the Note topic's triangle) are stored per-topic. As a consequence when you change e.g. a topic's color the topic appears in all topicmaps with that color (at the latest when you press Reload.)

The color and the expansion flag are considered purely view properties, like x, y, and the visibility (show/hide). They must be stored per view (= topicmap).

Change History

comment:1 Changed 6 years ago by jri

  • Status changed from new to accepted

comment:2 Changed 6 years ago by Jörg Richter <jri@…>

In f9bf82dc43c4ae1f99ab9357c26783fc93919b82/deepamehta:

Topicmaps: refactor view property storage (#761).

The standard view properties x, y, and visibility are stored as node properties (instead as child topics).
A migration that converts the properties is provided.

BREAKING CHANGES

Topicmaps API:

2 changed methods:

void addTopicToTopicmap(long topicmapId, long topicId, ViewProperties viewProps)
void setViewProperties(long topicmapId, long topicId, ViewProperties viewProps)

Now they take a ViewProperties object as the viewProps argument (instad a ChildTopicsModel)

ViewProperties is a new model class.

import de.deepamehta.plugins.topicmaps.model.ViewProperties

ViewmodelCustomizer interface:

1 changed method:

void enrichViewProperties(Topic topic, ViewProperties viewProps)

It takes a ViewProperties argument (instad a ChildTopicsModel).

1 dropped method:

void storeViewProperties(Topic topic, ChildTopicsModel viewProps)

The plugin developer must no longer care about storing custom view properties.
Now the Topicmaps plugin does this for you. It stores the view properties as node properties at the Topic Mapcontext association, just like the standard view properties.

See #761.

comment:3 Changed 6 years ago by Jörg Richter <jri@…>

In 66bb80edeeb6338c884d7f6fd18236bdb4695d09/deepamehta:

Box Renderer: store viewprops per-topicmap (#761).

The topic color and expansion flag (represented by the Note topic's triangle) are stored per-topicmap.

BREAKING CHANGES

Topicmaps API:

ViewmodelCustomizer interface:

1 changed method:

void enrichViewProperties(RelatedTopic topic, ViewProperties viewProps)

It takes a RelatedTopic argument (instad a Topic).
So the developer of a renderer plugin has access to the "Topic Mapcontext" association as well, e.g. to read custom view properties from it.

See #761.

comment:4 Changed 6 years ago by Jörg Richter <jri@…>

In 1fa701516330fa8ad39f128ac1d482685e6b19d9/deepamehta:

Migration: delete Mapcontext child types (#761).

Add Topicmaps migration 4 to delete the "Topic Mapcontext" child types and make "Topic Mapcontext" a simple type.

See #761.

comment:5 Changed 6 years ago by Jörg Richter <jri@…>

In e51f2c69671e8d402a760ef3d6cec46a01406eae/deepamehta:

Add Mig#1 to move BoxRenderer? properties (#761).

Add Box Renderer migration #1 to move the BoxRenderer? properties (color and expanded flag) from topics to the "Topic Mapcontext" associations.

See #761.

comment:6 Changed 6 years ago by jri

  • Status changed from accepted to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.