26 lines
579 B
26 lines
579 B
|
|
import { HighlightBehavior } from "./behavior.highlight"; |
|
import { RedMarkBehavior } from "./behavior.redmark"; |
|
|
|
export const BehaviorFactory = { |
|
createBehavior (key, options) { |
|
let Behavior; |
|
switch (key) { |
|
case "highlight": |
|
Behavior = HighlightBehavior; |
|
break; |
|
case "redmark": |
|
Behavior = RedMarkBehavior; |
|
break; |
|
default: |
|
} |
|
|
|
return new Behavior(options); |
|
}, |
|
}; |
|
|
|
export { Behavior } from "./0.behavior"; |
|
export { |
|
HighlightBehavior, |
|
RedMarkBehavior |
|
};
|
|
|